How do I use NVK on a laptop with hybrid graphics?

I’ve got a laptop with Intel integrated graphics and Nvidia discrete graphics. With Mesa 24.1 and kernel 6.9 IIUC I should have NVK, the new open-source Nvidia drivers, available. However, when I try to run a game from Steam, mangohud reports “Intel Graphics” as the gpu name. I can’t seem to find a straightforward and up-to-date explanation for how to either get games to default to the Nvidia card, or how to specify that a game should run on the Nvidia card. Does anyone have experience with this?

Please post the results of inxi -Fzxx here in preformatted text.

My understanding is that NVK is still under development and missing features. There is also mesa support needed to go with it that is also under development. You will be using the old nouveau driver at the moment I assume.

Since the NVK driver is not fully available the best option would be to install the nvidia drivers from rpmfusion.

Inxi output
  Kernel: 6.9.4-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: GNOME v: 46.2 tk: GTK v: 3.24.42 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 40 (Workstation Edition)
  Type: Laptop System: SLIMBOOK product: Executive v: Standard
    serial: <superuser required>
  Mobo: SLIMBOOK model: Executive v: Standard serial: <superuser required>
    part-nu: 0001 UEFI: American Megatrends LLC. v: N.1.05GRU06 date: 12/12/2023
  ID-1: BAT0 charge: 61.6 Wh (75.0%) condition: 82.1/82.1 Wh (100.0%)
    volts: 15.2 min: 15.5 model: standard serial: <filter> status: discharging
  Info: 14-core (6-mt/8-st) model: 12th Gen Intel Core i7-12700H bits: 64
    type: MST AMCP arch: Alder Lake rev: 3 cache: L1: 1.2 MiB L2: 11.5 MiB
    L3: 24 MiB
  Speed (MHz): avg: 861 high: 3500 min/max: 400/4600:4700:3500 cores: 1: 535
    2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 13: 400 14: 400 15: 400 16: 3500 17: 400 18: 1193 19: 2498
    20: 3500 bogomips: 107520
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics]
    vendor: Tongfang Hongkong driver: i915 v: kernel arch: Gen-12.2 ports:
    active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:46a6
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile]
    vendor: Tongfang Hongkong driver: nouveau v: kernel arch: Ampere pcie:
    speed: 2.5 GT/s lanes: 4 bus-ID: 01:00.0 chip-ID: 10de:25a0
  Device-3: Chicony FHD Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-6:3 chip-ID: 04f2:b75c
  Display: wayland server: v: 1.20.14 with: Xwayland v: 24.1.0
    compositor: gnome-shell driver: gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: BOE Display 0x0aca res: 2560x1600 dpi: 189
    diag: 406mm (16")
  API: OpenGL v: 4.6 vendor: intel mesa v: 24.1.1 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Graphics (ADL GT2)
    device-ID: 8086:46a6 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Device-1: Intel Alder Lake PCH-P High Definition Audio
    vendor: Tongfang Hongkong driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
    chip-ID: 8086:51c8
  API: ALSA v: k6.9.4-200.fc40.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:51f0
  IF: wlo1 state: up mac: <filter>
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:4 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
  Local Storage: total: 931.51 GiB used: 207.3 GiB (22.3%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT1000P3SSD8 size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 30.9 C
  ID-1: / size: 929.91 GiB used: 206.83 GiB (22.2%) fs: btrfs dev: /dev/dm-0
    mapped: luks-fd62b194-096c-476f-9b31-3769ef833513
  ID-2: /boot size: 973.4 MiB used: 464.8 MiB (47.8%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 929.91 GiB used: 206.83 GiB (22.2%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-fd62b194-096c-476f-9b31-3769ef833513
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  Src: /sys System Temperatures: cpu: 49.0 C mobo: N/A
  Fan Speeds (rpm): N/A
  Memory: total: 32 GiB note: est. available: 31.08 GiB used: 3.77 GiB (12.1%)
  Processes: 454 Power: uptime: 8m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: flatpak pkgs: 6 Compilers: gcc: 14.1.1 Shell: Zsh v: 5.9
    running-in: gnome-terminal inxi: 3.3.34

A Collabora news item from February states that “NVK is now ready for prime time”, “it’s now time to start shipping NVK to users”, and “NVK will be part of Mesa 24.1”.

NVK doesn’t replace Nouveau, but in fact requires Nouveau. NVK is the Mesa counterpart to the kernel’s Nouveau. The eventual replacement for Nouveau is called Nova but that isn’t here yet and in any case is not required by NVK.

Can you elaborate on that? It should be available.

Ok, When I run dnf list installed mesa* | awk '{print $1, $2}'

Installed Packages
mesa-dri-drivers.i686 1:24.1.1-1.fc40
mesa-dri-drivers.x86_64 1:24.1.1-1.fc40
mesa-filesystem.i686 1:24.1.1-1.fc40
mesa-filesystem.x86_64 1:24.1.1-1.fc40
mesa-libEGL.i686 1:24.1.1-1.fc40
mesa-libEGL.x86_64 1:24.1.1-1.fc40
mesa-libGL.i686 1:24.1.1-1.fc40
mesa-libGL.x86_64 1:24.1.1-1.fc40
mesa-libGLU.x86_64 9.0.3-4.fc40
mesa-libgbm.i686 1:24.1.1-1.fc40
mesa-libgbm.x86_64 1:24.1.1-1.fc40
mesa-libglapi.i686 1:24.1.1-1.fc40
mesa-libglapi.x86_64 1:24.1.1-1.fc40
mesa-libxatracker.x86_64 1:24.1.1-1.fc40
mesa-va-drivers.i686 1:24.1.1-1.fc40
mesa-va-drivers.x86_64 1:24.1.1-1.fc40
mesa-vulkan-drivers.i686 1:24.1.1-1.fc40
mesa-vulkan-drivers.x86_64 1:24.1.1-1.fc40

Also : vulkaninfo Which spit’s out a ton of stuff. . .

I assume because I have the Nvidia driver :thinking: I get this :

DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
ERROR: [../src/nouveau/vulkan/nvk_physical_device.c:1109] Code 0 : VK_ERROR_INCOMPATIBLE_DRIVER

Looks like you have already been doing a lot of searching on the topic. Honestly, I need the Nvidia Driver for Blender and other creative/testing workflows so i can’t break my build right now to test anything.

Post your finding here :+1:t5: :fedora:

There is another part called nova that works with nvk that RedHat is working on.
See for its announcement.

Once NVK and NOVA are feature complete enough you will have a replacement for nvidia’s driver is what I think is the situation. Your 3050 will be supported.

If there is enough of both to get things working today that would be great news.

That link is to a document dates March 20, 2024 so NOVA is obviously in the very early stages and likely will be some time before release.

It seems many are anxious for the open source replacement for the nvidia drivers to be released, but I doubt that will happen real soon.