Skip to main content
Topic: NVIDIA Optimus random hangs/freezes in Vulkan (Read 83 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

NVIDIA Optimus random hangs/freezes in Vulkan

I've been trying to migrate to Artix for the past week or so, but I cant manage to get my dGPU to cooperate. Certain applications making use of Vulkan will, after a short period of time (during which they function normally), freeze up and become unresponsive (though any audio from them continues to play). This includes vkmark (on both modes supported by my GPU) as well as at least one DXVK program run through WINE. vkcube is unaffected. Forcing the usage of my iGPU, forcing a rendering pipeline other than Vulkan, and booting in dGPU only mode all cause the problem to disappear, but none of those are an acceptable solution for me.

My CPU is an AMD Ryzen 7 4800H (iGPU: AMD Radeon Vega Series / Radeon Vega Mobile Series) and my GPU is an NVIDIA GeForce GTX 1650 Ti Mobile. I'm using the Zen kernel, but I've tried LTS and the default as well and it made no difference. I'm using the nvidia-open-dkms driver, but I've also tried nvidia-dkms as my card should support either (it's a Turing I believe?) and that didn't matter either. I've been trying to get the official method of dealing with Prime/Optimus working and haven't really tried any of the alternatives, though I suppose I'm willing to if this is absolutely impossible to get working.

I'm using X11, XFCE, and OpenRC.

I couldn't really find much that seemed very useful in /var/log, but have some random snippets from me grepping for nvidia in them:
Code: [Select]
log/Xorg.0.log:[    13.068] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
log/Xorg.0.log:[    13.081] (II) Applying OutputClass "nvidia" to /dev/dri/card0
log/Xorg.0.log:[    13.081] loading driver: nvidia
log/Xorg.0.log:[    13.081] (==) Matched nvidia as autoconfigured driver 2
log/Xorg.0.log:[    13.088] (II) LoadModule: "nvidia"
log/Xorg.0.log:[    13.088] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
log/Xorg.0.log:[    13.093] (II) Module nvidia: vendor="NVIDIA Corporation"
log/Xorg.0.log:[    13.407] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
log/Xorg.0.log:[    13.407] (II) Loading sub module "glxserver_nvidia"
log/Xorg.0.log:[    13.407] (II) LoadModule: "glxserver_nvidia"
log/Xorg.0.log:[    13.407] (II) Loading /usr/lib/nvidia/xorg/libglxserver_nvidia.so
log/Xorg.0.log:[    13.439] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
log/Xorg.0.log:[    13.594] (II) NVIDIA(G0): [DRI2]   VDPAU driver: nvidia


log/dmesg:[    7.994149] nvidia: loading out-of-tree module taints kernel.
log/dmesg:[    7.994162] nvidia: module verification failed: signature and/or required key missing - tainting kernel
log/dmesg:[    8.142835] nvidia-nvlink: Nvlink Core is being initialized, major device number 510
log/dmesg:[    8.143696] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
log/dmesg:[    8.143819] nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
log/dmesg:[    8.267588] nvidia-modeset: Loading NVIDIA UNIX Open Kernel Mode Setting Driver for x86_64  565.77  Release Build  (archlinux-builder@laptopArtix) 
log/dmesg:[    8.382707] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
log/dmesg:[    9.794501] nvidia-uvm: Loaded the UVM driver, major device number 507.
log/dmesg:[    9.845083] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 0
log/dmesg:[    9.845521] nvidia 0000:01:00.0: [drm] Cannot find any crtc or sizes


log/rc.log:modules          | * Loading module nvidia-uvm ...
log/rc.log:modules          |insmod /lib/modules/6.12.9-zen1-1-zen/kernel/drivers/video/nvidia.ko.zst NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
log/rc.log:modules          |insmod /lib/modules/6.12.9-zen1-1-zen/kernel/drivers/video/nvidia-uvm.ko.zst

Thank you in advance! Please let me know if I've forgotten to include something important for troubleshooting or if this is the wrong section of the forum.

Re: NVIDIA Optimus random hangs/freezes in Vulkan

Reply #1
Ah! I had someone else's troubleshooting thread from elsewhere (about a different problem, sadly) open and I noticed they posted some output from lsmod and lspci and it seems like it might be helpful for me to do the same:

lsmod | grep -E "nouveau|nvidia|amd"
Code: [Select]
snd_sof_amd_acp70      16384  0
snd_sof_amd_acp63      16384  0
snd_soc_acpi_amd_match     8192  1 snd_sof_amd_acp63
snd_sof_amd_vangogh    16384  0
amd_atl                61440  1
snd_sof_amd_rembrandt    16384  0
snd_sof_amd_renoir     16384  0
snd_sof_amd_acp        73728  5 snd_sof_amd_acp70,snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_sof_amd_renoir
snd_sof_pci            24576  5 snd_sof_amd_acp70,snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_sof_amd_renoir
snd_sof_xtensa_dsp     16384  1 snd_sof_amd_acp
snd_sof               475136  2 snd_sof_amd_acp,snd_sof_pci
snd_amd_sdw_acpi       16384  2 snd_sof_amd_acp,snd_pci_ps
nvidia_drm            139264  3
soundwire_amd          45056  2 snd_sof_amd_acp,snd_pci_ps
soundwire_generic_allocation    12288  1 soundwire_amd
kvm_amd               241664  0
nvidia_uvm           4083712  0
nvidia_modeset       1986560  3 nvidia_drm
soundwire_bus         151552  2 soundwire_generic_allocation,soundwire_amd
kvm                  1470464  1 kvm_amd
snd_soc_core          471040  2 snd_sof,soundwire_amd
nvidia              11431936  32 nvidia_uvm,nvidia_modeset
snd_pcm               221184  13 snd_sof_amd_acp,snd_hda_codec_hdmi,snd_pci_acp6x,snd_hda_intel,snd_hda_codec,snd_sof,snd_compress,snd_soc_core,snd_sof_utils,soundwire_amd,snd_hda_core,snd_pci_ps,snd_pcm_dmaengine
snd_acp_config         24576  10 snd_rn_pci_acp3x,snd_sof_amd_acp70,snd_pci_acp6x,snd_pci_acp5x,snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_acp_pci,snd_pci_ps,snd_sof_amd_renoir
snd_soc_acpi           16384  3 snd_sof_amd_acp,snd_acp_config,snd_pci_ps
ccp                   192512  1 kvm_amd
amdgpu              16453632  25
amdxcp                 12288  1 amdgpu
i2c_algo_bit           24576  1 amdgpu
drm_ttm_helper         16384  3 amdgpu,nvidia_drm
ttm                   114688  2 amdgpu,drm_ttm_helper
drm_exec               12288  1 amdgpu
gpu_sched              65536  1 amdgpu
drm_suballoc_helper    16384  1 amdgpu
drm_buddy              24576  1 amdgpu
drm_display_helper    290816  1 amdgpu
crc16                  12288  3 bluetooth,amdgpu,ext4
video                  81920  3 amdgpu,ideapad_laptop,nvidia_modeset

lspci -k
Code: [Select]
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
Subsystem: Lenovo Device 3804
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
Subsystem: Lenovo Device 3803
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
Subsystem: Lenovo Device 382b
Kernel driver in use: pcieport
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
Subsystem: Lenovo Device 382b
Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
Subsystem: Lenovo Device 382b
Kernel driver in use: pcieport
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
Subsystem: Lenovo Device 382b
Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
Subsystem: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
Kernel driver in use: pcieport
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
Subsystem: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
Subsystem: Lenovo Device 3830
Kernel driver in use: piix4_smbus
Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
Subsystem: Lenovo Device 382f
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
Kernel driver in use: k10temp
Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)
Subsystem: Lenovo Device 3a3e
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)
Subsystem: NVIDIA Corporation Device 10fa
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
02:00.0 Non-Volatile memory controller: SK hynix BC511 NVMe SSD
Subsystem: SK hynix Device 0000
Kernel driver in use: nvme
Kernel modules: nvme
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)
DeviceName: Realtek RTL8111E Ethernet LOM
Subsystem: Lenovo Device 38e0
Kernel driver in use: r8169
Kernel modules: r8169
04:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
Subsystem: Intel Corporation Wi-Fi 6 AX200NGW
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6)
Subsystem: Lenovo Device 3a3e
Kernel driver in use: amdgpu
Kernel modules: amdgpu
05:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
Subsystem: Lenovo Device 3818
Kernel driver in use: ccp
Kernel modules: ccp
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
Subsystem: Lenovo Device 3816
Kernel driver in use: xhci_hcd
05:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
Subsystem: Lenovo Device 3816
Kernel driver in use: xhci_hcd
05:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
Subsystem: Lenovo Device 381c
Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63, snd_sof_amd_acp70
05:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
Subsystem: Lenovo Device 381b
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
06:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
Subsystem: Lenovo Device 3821
Kernel driver in use: ahci
06:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
Subsystem: Lenovo Device 3821
Kernel driver in use: ahci

...The distro I'm coming from (MX) had a troubleshooting tool that spit out everything useful, so I'm not used to this.