https://bugs.winehq.org/show_bug.cgi?id=52342
Bug ID: 52342 Summary: Outdated Cuda version Product: Wine Version: 7.0-rc4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: nvcuda Assignee: wine-bugs@winehq.org Reporter: automates+bugwine@lepouete.fr Distribution: ---
Created attachment 71510 --> https://bugs.winehq.org/attachment.cgi?id=71510 Cuda-z results
The integrated cuda version is out of date. On some softwares, it can lead to compatibility issues and features not working, or even complete software.
As you can see on the screenshot, Cuda Compute Capability is at the version 8.2, and Cuda Runtime Dll is at the version 6.50. As far as I know, last version is 11.50, so the Driver Dll should be ok?
(on my computer, wine-staging 7.0-rc4, Archlinux, official nvidia drivers)
I know that GPU rendering on Daz Studio won’t work because of this issue. Other softwares might be impacted.
I’d love to help, sadly I know quite nothing at Cuda and C++. Still, if I can, I’m available.
Thank you
https://bugs.winehq.org/show_bug.cgi?id=52342
Moté automates+bugwine@lepouete.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |automates+bugwine@lepouete. | |fr
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #1 from Moté automates+bugwine@lepouete.fr --- I forgot, but I know that other people on other linux systems are impacted as well. On Daz forum, nobody has come up with a workaround.
https://bugs.winehq.org/show_bug.cgi?id=52342
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com | |, z.figura12@gmail.com Product|Wine |Wine-staging Component|nvcuda |-unknown
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- I've just add a new patch to staging to update the functions list to CUDA 10 (based of the driver I have a available). If you can test when the next staging is released that would be great.
Just for the record, it might just crash since no new functions have been added as such.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #3 from Moté automates+bugwine@lepouete.fr --- Hello,
Thank you @Alistair! I’ll do that as soon as it is released (should come quickly to Archlinux).
Also, I’ve checked Daz Studio requirements, and they say they need only Compute Capability 2.0. So outdated Cuda might not be the problem? Maybe there is another bug? Do you know how I could get more logs? The most I could get was by using WINEPREFIX=+loaddll. I’ll ask Daz for a debug version, too, we’ll see if they accept.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #4 from Moté automates+bugwine@lepouete.fr --- Hello again,
I was going over the logs again. The key message might be : cudaRuntimeGetVersion returned with error 'initialization error'
Which is a part of the Runtime API : https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART____VERSION.html#...
I’m really not sure, but aren’t the Driver API and the Runtime API 2 separated libraries? I think the runtime API is the cudart64_110.dll, which isn’t supported at all by Wine?
Thank you
https://bugs.winehq.org/show_bug.cgi?id=52342
Sveinar Søpler cybermax@dexter.no changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cybermax@dexter.no
--- Comment #5 from Sveinar Søpler cybermax@dexter.no --- (In reply to Moté from comment #3)
Hello,
Thank you @Alistair! I’ll do that as soon as it is released (should come quickly to Archlinux).
Also, I’ve checked Daz Studio requirements, and they say they need only Compute Capability 2.0. So outdated Cuda might not be the problem? Maybe there is another bug? Do you know how I could get more logs? The most I could get was by using WINEPREFIX=+loaddll. I’ll ask Daz for a debug version, too, we’ll see if they accept.
You can log cuda functions with WINEDEBUG=+nvcuda
nvcuda works by relaying cuda functions from the nvcuda.dll -> linux libcuda.so, so it depends on your nvidia driver and if that is new enough. nVidia driver should install this in syslib folders - something like /usr/lib/libcuda.so.xx.xx where xx.xx = the driver version eg. /usr/lib/libcuda.so.495.46
I think "Compute Capability 2.0" should be Cuda 8.0'ish when it comes to the actual "cuda version", but i am not 100% sure how that would tie in with this. I guess the best bet is to use this updated cuda and log with +nvcuda to check if there are any errors indicating this.
https://tech.amikelive.com/node-930/cuda-compatibility-of-nvidia-display-gpu...
Has a list of "compute capability" "cuda version" and "driver version".
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #6 from Moté automates+bugwine@lepouete.fr --- Created attachment 71513 --> https://bugs.winehq.org/attachment.cgi?id=71513 Winedebug nvcuda
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #7 from Moté automates+bugwine@lepouete.fr ---
You can log cuda functions with WINEDEBUG=+nvcuda
I did that this morning, now I posted it.
nvcuda works by relaying cuda functions from the nvcuda.dll -> linux libcuda.so, so it depends on your nvidia driver and if that is new enough. nVidia driver should install this in syslib folders - something like /usr/lib/libcuda.so.xx.xx where xx.xx = the driver version eg. /usr/lib/libcuda.so.495.46
I got the same version as you. Also, I got libcudart.so.11.5.117.
I think "Compute Capability 2.0" should be Cuda 8.0'ish when it comes to the actual "cuda version", but i am not 100% sure how that would tie in with this. I guess the best bet is to use this updated cuda and log with +nvcuda to check if there are any errors indicating this.
https://tech.amikelive.com/node-930/cuda-compatibility-of-nvidia-display-gpu... drivers/
Has a list of "compute capability" "cuda version" and "driver version".
As you can see in my cuda-z screenshot (launched trough wine), it seems to be ok (Compute Capability 8.6). But according to the nvidia page, it seems to be more of an hardware compatibility information, rather than software : https://developer.nvidia.com/cuda-gpus
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #8 from Sveinar Søpler cybermax@dexter.no --- (In reply to Moté from comment #7)
As you can see in my cuda-z screenshot (launched trough wine), it seems to be ok (Compute Capability 8.6). But according to the nvidia page, it seems to be more of an hardware compatibility information, rather than software : https://developer.nvidia.com/cuda-gpus
cuda-z only says what "compute capability" your GPU actually has.... regardless of driver or nvcuda implementation. I get "Compute capability: 7.5" on my RTX 2070. (And 5.2 on my GTX970)
I will download DAZ Studio and see if i can get it running, and what i can figure out if the stub-patch helps in any way.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #9 from Moté automates+bugwine@lepouete.fr ---
cuda-z only says what "compute capability" your GPU actually has.... regardless of driver or nvcuda implementation. I get "Compute capability: 7.5" on my RTX 2070. (And 5.2 on my GTX970)
I will download DAZ Studio and see if i can get it running, and what i can figure out if the stub-patch helps in any way.
Thank you!
You just have to launch Daz Studio, no need for more. Daz tries to instantiate Cuda at the start. Then, you can search for the log.txt and see if it works.
I’ll try to build the patched wine-staging.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #10 from Moté automates+bugwine@lepouete.fr --- Created attachment 71516 --> https://bugs.winehq.org/attachment.cgi?id=71516 Crash report after cuda patch
https://bugs.winehq.org/show_bug.cgi?id=52342
Moté automates+bugwine@lepouete.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71513|0 |1 is obsolete| |
--- Comment #11 from Moté automates+bugwine@lepouete.fr --- Created attachment 71517 --> https://bugs.winehq.org/attachment.cgi?id=71517 Winedebug nvcuda after cuda patch
I’ve compiled wine-staging with the new patch. Something clearly happened, at least it started to try to launch Cuda! As you can see on the winedebug and the crash report, it doesn’t seem to like the stub for the cuDeviceGetUuid.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #12 from Sveinar Søpler cybermax@dexter.no --- Created attachment 71519 --> https://bugs.winehq.org/attachment.cgi?id=71519 Uuid and Luid
Added two stubbed functions that made DAZ start again.
Still not actually rendering with CUDA tho (when you press the render button). Guess its still something missing there.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #13 from Sveinar Søpler cybermax@dexter.no --- (In reply to Sveinar Søpler from comment #12)
Created attachment 71519 [details] Uuid and Luid
Added two stubbed functions that made DAZ start again.
Still not actually rendering with CUDA tho (when you press the render button). Guess its still something missing there.
Somewhat wrong wording.. i made the stubbed functions become real functions? :O
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #14 from Moté automates+bugwine@lepouete.fr --- (In reply to Sveinar Søpler from comment #13)
(In reply to Sveinar Søpler from comment #12)
Created attachment 71519 [details] Uuid and Luid
Added two stubbed functions that made DAZ start again.
Still not actually rendering with CUDA tho (when you press the render button). Guess its still something missing there.
Somewhat wrong wording.. i made the stubbed functions become real functions? :O
Damn it! I was about to post my patch! Well, we did exactly the same, I guess at least I’m happy I understood how it worked.
We’re back to the old problem:
CUDA module initialization failed. cudaRuntimeGetVersion returned with error 'initialization error'
I really think this is an issue with cudart and not nvcuda. Would mean that we’d need to do exactly the same for cudart than for nvcuda.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #15 from Sveinar Søpler cybermax@dexter.no --- (In reply to Moté from comment #14)
CUDA module initialization failed. cudaRuntimeGetVersion returned with error 'initialization error'
I really think this is an issue with cudart and not nvcuda. Would mean that we’d need to do exactly the same for cudart than for nvcuda.
I do not think "cudart" is a driver library like nvcuda is. Now i do not understand much, but cudart64.dll is included with DAZStudio - as something the vendors include to do cuda functions... Much the same way games include stuff like nvngx_dlss.dll when using dlss with games. "WE" dont need to implement nvngx_dlss.dll cos this is the api that "talks to" nvngx.dll.
Developers can i think use cudart64.dll to call various cuda functions FROM nvcuda.. somewhat in the same manner games uses nvngx_dlss.dll to call various dlss functions from the driver (via nvngx.dll)
Atleast i think this is how it works, but feel free to correct me if i am totally off tho.
I will continue to do some tests here, and hack away at some functions to see what comes up. This looks a bit weird in the DAZ log: 2022-01-05 22:04:45.278 NVIDIA Iray GPUs: 2022-01-05 22:04:45.278 GPU: 1 - 2022-01-05 22:04:45.278 Memory Size: -1 bytes 2022-01-05 22:04:45.278 Clock Rate: -1 kHz 2022-01-05 22:04:45.278 Multi Processor Count: -1 2022-01-05 22:04:45.278 CUDA Device ID: -1 2022-01-05 22:04:45.278 CUDA Compute Capability: NA 2022-01-05 22:04:45.278 PCI Bus ID: 6488169 2022-01-05 22:04:45.278 PCI Device ID: 2097253 2022-01-05 22:04:45.278 TCC Mode: disabled 2022-01-05 22:04:45.278 Display: attached
And the GPU name that shows up in DAZ is also weird, as it seems to just be a pointer to something rather than the actual name.. But NvAPI_GPU_GetFullName is being called, so that SHOULD get the name. Perhaps it tries to pick the GPU info for all of this from nvcuda? Seems weird, since the logs does not seem to indicate cuDeviceGetName being called. Maybe it is a new (cuda 11+) function for name of adapter and various info that has been implemented?
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #16 from Moté automates+bugwine@lepouete.fr --- (In reply to Sveinar Søpler from comment #15)
I do not think "cudart" is a driver library like nvcuda is. Now i do not understand much, but cudart64.dll is included with DAZStudio - as something the vendors include to do cuda functions... Much the same way games include stuff like nvngx_dlss.dll when using dlss with games. "WE" dont need to implement nvngx_dlss.dll cos this is the api that "talks to" nvngx.dll.
Developers can i think use cudart64.dll to call various cuda functions FROM nvcuda.. somewhat in the same manner games uses nvngx_dlss.dll to call various dlss functions from the driver (via nvngx.dll)
That makes sense, and would explain why cudart is furnished by the cuda-toolkit and not the cuda driver. Then maybe we need to know more about the calls between the 2 libs? I tried the relay channel with winedebug, but it didn’t seem to work.
I will continue to do some tests here, and hack away at some functions to see what comes up. This looks a bit weird in the DAZ log: 2022-01-05 22:04:45.278 NVIDIA Iray GPUs: 2022-01-05 22:04:45.278 GPU: 1 - 2022-01-05 22:04:45.278 Memory Size: -1 bytes 2022-01-05 22:04:45.278 Clock Rate: -1 kHz 2022-01-05 22:04:45.278 Multi Processor Count: -1 2022-01-05 22:04:45.278 CUDA Device ID: -1 2022-01-05 22:04:45.278 CUDA Compute Capability: NA 2022-01-05 22:04:45.278 PCI Bus ID: 6488169 2022-01-05 22:04:45.278 PCI Device ID: 2097253 2022-01-05 22:04:45.278 TCC Mode: disabled 2022-01-05 22:04:45.278 Display: attached
And the GPU name that shows up in DAZ is also weird, as it seems to just be a pointer to something rather than the actual name.. But NvAPI_GPU_GetFullName is being called, so that SHOULD get the name. Perhaps it tries to pick the GPU info for all of this from nvcuda? Seems weird, since the logs does not seem to indicate cuDeviceGetName being called. Maybe it is a new (cuda 11+) function for name of adapter and various info that has been implemented?
I’m in contact with the dxvk-nvapi developer on the other end, and we were able to fix the nvapi issues. With it, the full name of my GPU appears in Daz, alongside the strange Cuda number. And this part now looks like:
NVIDIA Iray GPUs: GPU: 1 - NVIDIA GeForce RTX 3060 Memory Size: 12.2 GB Clock Rate: -1 kHz Multi Processor Count: -1 CUDA Device ID: -1 CUDA Compute Capability: NA PCI Bus ID: 1 PCI Device ID: 0 TCC Mode: disabled
We don’t get any more NVAPI calls, so I don’t think the issue is there.
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #17 from Moté automates+bugwine@lepouete.fr --- I’m still looking for a solution. It looked like it was the cuInit() function that was failing, since Daz reported an initialization error and made repeated calls to it. But I had a look, there is nothing strange with it. The parameter was strangely not named in the CUresult call, but modifying it didn’t resolve the issue.
However, there is this line that may be concerning? Could it be the sign of a function not implemented?
04b4:trace:nvcuda:Unknown1_func1_relay (0x14d98be8, (nil))
https://bugs.winehq.org/show_bug.cgi?id=52342
Sveinar Søpler cybermax@dexter.no changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71519|0 |1 is obsolete| |
--- Comment #18 from Sveinar Søpler cybermax@dexter.no --- Created attachment 71600 --> https://bugs.winehq.org/attachment.cgi?id=71600 Staging cuda patches
I have attached 2 patches needed for DAZ Studio4 to get CUDA working.
To actually get hardware rendering there is a couple of nvapi functions required and a relay library for nVidia OptiX, so i have marked the patches as "partially resolves".
https://bugs.winehq.org/show_bug.cgi?id=52342
--- Comment #19 from Moté automates+bugwine@lepouete.fr --- I think everything is ok, now?