GPU devices not reported correctly
Closed, ArchivedPublic


System Information
elementaryOS 0.4.1, GTX 1080

Blender Version
Broken: 2.79 e32c1bd)
Worked: (2.79)

Short description of error
The CUDA devices are not reported properly by C.user_preferences.addons['cycles'].preferences.devices. It labels the wrong card as display. I guess it happened when GPU+CPU was introduced recently.

Exact steps for others to reproduce the error
Probably you need a multiGPU setup. If you compare the settings in user-preferences with what the python console is reporting, there seems to be a mismatch.
The display in my computer is only connected to the GTX980 Ti, correctly reported by user-prefs, but not py Python.
See screenshot:


Brecht Van Lommel (brecht) triaged this task as Normal priority.EditedNov 3 2017, 1:14 PM

C.user_preferences.addons['cycles'].preferences.devices is not a list of currently connected devices. Rather it contains settings for all devices that have ever been encountered, even if they are not currently connected. We can't always distinguish between devices if the system setup changes, so there could be some hidden duplicates in that list that are never shown in the user preferences.

You could use this instead:

cuda_devices, opencl_devices = C.user_preferences.addons['cycles'].preferences.get_devices()

Maybe we can improve something in the API here, though likely we want to preserve settings for all encountered devices.

Oh alright, sorry. Thanks a lot for the answer! :)

I'll treat this as a to do item, we'll likely do some API changes for D2894.