Page MenuHome

Unable to select GPU rendering - terminal shows error related to _cycles.available_devices(self.compute_device_type)
Closed, ResolvedPublic

Description

System Information
Operating system: Manjaro Linux
Graphics card: RTX 2060 and integrated AMD

Blender Version
Broken: Blender 2.82a 375c7dc4caf4

Short description of error
My graphics card does not show up in settings and trying to select GPU compute in the Cycles dropdown menu results in the option disappearing and an error in the terminal I run blender from the terminal (attached).

My suspicion is that something goes wrong due to the fact that I have a Nvidia dedicated GPU and an AMD integrated GPU (it has caused trouble before). However, I am able to run other CUDA applications just fine.

The following shows up in the terminal both when I click the dropdown option and when I view the CUDA settings in preferences.

`
	Traceback (most recent call last):
  File "/usr/share/blender/2.82/scripts/modules/bpy_types.py", line 799, in draw_ls
    func(self, context)
  File "/usr/share/blender/2.82/scripts/addons/cycles/ui.py", line 2198, in draw_device
    col.active = show_device_active(context)
  File "/usr/share/blender/2.82/scripts/addons/cycles/ui.py", line 113, in show_device_active
    return context.preferences.addons[__package__].preferences.has_active_device()
  File "/usr/share/blender/2.82/scripts/addons/cycles/properties.py", line 1547, in has_active_device
    return self.get_num_gpu_devices() > 0
  File "/usr/share/blender/2.82/scripts/addons/cycles/properties.py", line 1536, in get_num_gpu_devices
    device_list = _cycles.available_devices(self.compute_device_type)
SystemError: <built-in function available_devices> returned a result with an error set
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 51: invalid continuation byte

Exact steps for others to reproduce the error
See attached gif.

Event Timeline

Josh Chandler (verdog) renamed this task from Unable to select GPU rendering - terminal shows error related to to Unable to select GPU rendering - terminal shows error related to _cycles.available_devices(self.compute_device_type).May 3 2020, 6:33 PM
Josh Chandler (verdog) created this task.
Josh Chandler (verdog) updated the task description. (Show Details)

The available_devices_func from blender_python.cpp retrieves a byte sequence that isn't valid UTF-8. This appears to be an encoding issue. Do you know the name of your integrated GPU? It's not listed in your system info file.

The actual chip is the AMD Ryzen 9 4900HS. https://www.amd.com/en/products/apu/amd-ryzen-9-4900hs

Looks like it calls the graphics "Renoir" internally? Here's lspci:

VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c5) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Renoir
Flags: bus master, fast devsel, latency 0, IRQ 56
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e0000000 (64-bit, prefetchable) [size=2M]
I/O ports at e000 [size=256]
Memory at fc500000 (32-bit, non-prefetchable) [size=512K]
Capabilities: [48] Vendor Specific Information: Len=08 <?>
Capabilities: [50] Power Management version 3
Capabilities: [64] Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
Capabilities: [270] Secondary PCI Express
Capabilities: [2b0] Address Translation Service (ATS)
Capabilities: [2c0] Page Request Interface (PRI)
Capabilities: [2d0] Process Address Space ID (PASID)
Capabilities: [400] Data Link Feature <?>
Capabilities: [410] Physical Layer 16.0 GT/s <?>
Capabilities: [440] Lane Margining at the Receiver <?>
Kernel driver in use: amdgpu
Kernel modules: amdgpu

It might be worth noting that I've done my best to completely disable the integrated graphics card (I manually switch between them), which is probably why it didn't show up in the system info.

Here is the system-info file after switching to integrated. (The same issue occurs.)

@Josh Chandler (verdog) Thank you for the provided information.

You seem to be using a package from your distribution that is a modified version of 2.82a. For instance it uses Python 3.8.2. Could you please check if the issue also occurs with the official release?

Tried with the official release, which uses Python 3.7 by the looks of it, and got the same result.


I'm also noticing that the error message can be slightly different at times. For example, in the newest attached errors here, the error says "decode byte 0xe0 in position 49", where the original one says "decode byte 0xf3 in position 51"

Brecht Van Lommel (brecht) changed the task status from Needs Triage to Needs Information from User.EditedMay 5 2020, 12:41 PM

A potential fix for this was committed. Is it still an issue in the latest build? Do the device names show up properly in the preferences now?

@Josh Chandler (verdog) The most recent daily build of Blender 2.90 and 2.83 can be downloaded on this page.

Josh Chandler (verdog) closed this task as Resolved.May 5 2020, 3:32 PM
Josh Chandler (verdog) claimed this task.

The issue is fixed in 2.83. (ac6be6759ecc).

By the way, here's the listing of the devices. Looks like the AMD CPU has a weird character at the very end, which was causing the crash. Thanks guys!