You are not logged in.

#1 2023-11-22 22:25:49

ltsdw
Member
Registered: 2020-04-20
Posts: 76

[Solved] Problems Render Cycles in Blender (CUDA cuInit Unknown error)

Sometimes Blender will show both my dGPU and iGPU in cycle work once I reboot, but if I close Blender to do other stuff and try to reopen it, it won't list my dGPU (neither my iGPU) as options to render.
Sometimes even rebooting won't work.

Some package versions:

Name            : cuda
Version         : 12.3.0-6

Name            : cuda-tools
Version         : 12.3.0-6

Name            : nvidia-dkms
Version         : 545.29.02-2

Name            : nvidia-utils
Version         : 545.29.02-2

Name            : linux
Version         : 6.6.2.arch1-1

Name            : linux-headers
Version         : 6.6.2.arch1-1

iGPU and dGPU lscpi output:

0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1)

nvidia-msi:

     
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.02              Driver Version: 545.29.02    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| 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 RTX 3050 ...    Off | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P8              10W /  60W |      9MiB /  4096MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A     14741      G   /usr/lib/Xorg                                 4MiB |
+---------------------------------------------------------------------------------------+

lsmod | grep nvidia:

nvidia_uvm           2080768  0
nvidia_drm            110592  3
nvidia_modeset       1581056  3 nvidia_drm
nvidia              62361600  40 nvidia_uvm,nvidia_modeset
video                  77824  3 acer_wmi,i915,nvidia_modeset

It also throws this tantrum every time I open it, even when it works:

Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/usr/share/blender/4.0/scripts/addons/io_scene_gltf2/__init__.py", line 1661, in register
    blender_ui.register()
  File "/usr/share/blender/4.0/scripts/addons/io_scene_gltf2/blender/com/gltf2_blender_ui.py", line 521, in register
    bpy.types.NODE_MT_category_SH_NEW_OUTPUT.append(add_gltf_settings_to_menu)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'module' object has no attribute 'NODE_MT_category_SH_NEW_OUTPUT'
Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/usr/share/blender/4.0/scripts/addons/pose_library/__init__.py", line 42, in register
    gui.register()
  File "/usr/share/blender/4.0/scripts/addons/pose_library/gui.py", line 217, in register
    register_message_bus()
  File "/usr/share/blender/4.0/scripts/addons/pose_library/gui.py", line 167, in register_message_bus
    bpy.msgbus.subscribe_rna(
TypeError: subscribe_rna: struct FileAssetSelectParams does not contain property asset_library_ref
Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/usr/share/blender/4.0/scripts/addons/io_scene_gltf2/__init__.py", line 1661, in register
    blender_ui.register()
  File "/usr/share/blender/4.0/scripts/addons/io_scene_gltf2/blender/com/gltf2_blender_ui.py", line 520, in register
    bpy.utils.register_class(NODE_OT_GLTF_SETTINGS)
ValueError: register_class(...): already registered as a subclass 'NODE_OT_GLTF_SETTINGS'
Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/usr/share/blender/4.0/scripts/addons/pose_library/__init__.py", line 40, in register
    operators.register()
  File "/usr/share/blender/4.0/scripts/modules/bpy/utils/__init__.py", line 776, in register
    register_class(cls)
ValueError: register_class(...): already registered as a subclass 'ASSET_OT_assign_action'
CUDA cuInit: Unknown error
Exception in module register(): /usr/share/blender/4.0/scripts/addons/io_scene_gltf2/__init__.py
Exception in module register(): /usr/share/blender/4.0/scripts/addons/pose_library/__init__.py
Exception in module register(): /usr/share/blender/4.0/scripts/addons/io_scene_gltf2/__init__.py
Exception in module register(): /usr/share/blender/4.0/scripts/addons/pose_library/__init__.py
Read prefs: "/home/little/.config/blender/4.0/config/userpref.blend"
Saved session recovery to "/tmp/quit.blend"

Blender quit

But only when it fails to list my GPUs under cycles render devices that it will error with:

CUDA cuInit: Unknown error

OptiX also doesn't list any gpu there.


Apparently this was causing it:

/etc/modprobe.d/nvidia.conf

options nvidia NVreg_InitializeSystemMemoryAllocations=0

Removing this option seems to solve it.

Last edited by ltsdw (2023-11-23 20:07:43)

Offline

Board footer

Powered by FluxBB