Daz Studio and Linux

1424345474853

Comments

  • Moté said:

    Hello guys!

    WE DID IT!!!

    This render is ugly, but is using Iray render on GPU!

    Oh god, I’m so happy!

    Congratulations, I am so happy for youlaugh! I've been a long time lurker of this thread as I really do not have the knowledge to add anything meaningful in order to get DS running on Linux,.but this sounds rather exciting. Does this mean I can ditch Windows in the near future and still work with DS?

  • MotéMoté Posts: 29
    edited January 2022

    BlueFingers said:

    Congratulations, I am so happy for youlaugh! I've been a long time lurker of this thread as I really do not have the knowledge to add anything meaningful in order to get DS running on Linux,.but this sounds rather exciting. Does this mean I can ditch Windows in the near future and still work with DS?

    As much as I’d like to say yes, I can’t advise it easily. You should first try launching Daz and see how performances are impacted and if you find it acceptable. Sadly, I don’t think there is any way for us to improve performance, it’s all up to nvidia on this one (although, I have absolutely no idea of how it impacts performance, I never used Daz on Windows). Also, we cannot guarantee that Daz will keep working. A software or driver update could break it again. In fact, it could completely stop working.

    For me, it’s not a question as I hate Windows and would rather stop using Daz than quit Linux (even for a dualboot). But that’s up to you to see if you want to take these risks ^^

    Although, I don’t see why it should stop working. Cuda and OptiX are open to dev, so it should be relatively easy to fix any bug. In fact, Saancreed who did the wine OptiX library did it in a few hours, and it’s mostly copy/paste to add support for other versions. As for Cuda, the hard part was to understand which functions were causing a problem, and "extend" then. I’ll post in my tutorial where to post bug reports if needed :)

    So my advice would be maybe to wait for Daz 5 (if doesn’t take too long to come), as it may break compability, and do some tests with a dualboot Linux. Then, you can chose between the two of them.

    Post edited by Moté on
  • Moté said:

    BlueFingers said:

    Congratulations, I am so happy for youlaugh! I've been a long time lurker of this thread as I really do not have the knowledge to add anything meaningful in order to get DS running on Linux,.but this sounds rather exciting. Does this mean I can ditch Windows in the near future and still work with DS?

    As much as I’d like to say yes, I can’t advise it easily. You should first try launching Daz and see how performances are impacted and if you find it acceptable. Sadly, I don’t think there is any way for us to improve performance, it’s all up to nvidia on this one (although, I have absolutely no idea of how it impacts performance, I never used Daz on Windows). Also, we cannot guarantee that Daz will keep working. A software or driver update could break it again. In fact, it could completely stop working.

    For me, it’s not a question as I hate Windows and would rather stop using Daz than quit Linux (even for a dualboot). But that’s up to you to see if you want to take these risks ^^

    Although, I don’t see why it should stop working. Cuda and OptiX are open to dev, so it should be relatively easy to fix any bug. In fact, Saancreed who did the wine OptiX library did it in a few hours, and it’s mostly copy/paste to add support for other versions. As for Cuda, the hard part was to understand which functions were causing a problem, and "extend" then. I’ll post in my tutorial where to post bug reports if needed :)

    So my advice would be maybe to wait for Daz 5 (if doesn’t take too long to come), as it may break compability, and do some tests with a dualboot Linux. Then, you can chose between the two of them.

    Makes sense, still I think it's great news so thanks for all your hard work.

  • By the way, Moté, would going that route also affect the normal viewport? Studio sometimes freezes on me when I there's a lot going on in the viewport. Rarely in standard textured shader mode but usually after seconds of manipulating things when in Filament. For example I can provoke a crash really easily by having some items in the scene, then switching to Filament and then wildly moving a light source around or rotating the environment map. This reliably freezes the window in just seconds and happens at some random point even when working normally so I pretty much can't use Filament at all. It's just too frustrating when you know that any click could be the last of the session and especially annyoing if your scene files are so big that they take a while to load again after a crash. Luckily non-Filament viewport Studio works quite reliably and stable.

    So, I wonder if your discoveries may also solve some problems with the normal viewport...

  • MotéMoté Posts: 29

    loopenox said:

    By the way, Moté, would going that route also affect the normal viewport? Studio sometimes freezes on me when I there's a lot going on in the viewport. Rarely in standard textured shader mode but usually after seconds of manipulating things when in Filament. For example I can provoke a crash really easily by having some items in the scene, then switching to Filament and then wildly moving a light source around or rotating the environment map. This reliably freezes the window in just seconds and happens at some random point even when working normally so I pretty much can't use Filament at all. It's just too frustrating when you know that any click could be the last of the session and especially annyoing if your scene files are so big that they take a while to load again after a crash. Luckily non-Filament viewport Studio works quite reliably and stable.

    So, I wonder if your discoveries may also solve some problems with the normal viewport...

    One of the people who did that awesome work had the same problem. I didn’t, but my scenes were relatively simple. Sadly, it didn’t fix this problem, apparently. Maybe having a more up-to-date system allows to avoid it (as I run on Archlinux, and he was on Ubuntu), but I can’t say without further testing. I could only advise him to not use Filament ^^’ (For me, it’s really ugly when I try Filament, so it’s ok to not use it, for you I don’t know) Maybe Daz 5 will help, as I think I read somewhere they are working on the Filament renderer to make it more useful.

  • Interesting, is there a thread where they're talking about the plans, improvements, and goals for Filament in Daz5?

  • Hello! For those who experience issue with Daz stuck on IRAY rendering so you have to kill the process. Run Daz again, render the empty scene with no any objects loaded (usialy it takes a couple of seconds with no stuck), after that load a scene you want to render and render it again (it should be successful now). Hope it will help.

  • MotéMoté Posts: 29

    nomad-ads_8ecd56922e said:

    Interesting, is there a thread where they're talking about the plans, improvements, and goals for Filament in Daz5?

    Absolutely no idea, I don’t know where I saw that

  • Moté said:

    [a lot of awesome things across all his posts]

    Super work Moté! Where is it you and the other people discuss the work? Do you have a github page? I'd love to see it.

  • MotéMoté Posts: 29
    edited January 2022

    avalentin6544 said:

    Moté said:

    [a lot of awesome things across all his posts]

    Super work Moté! Where is it you and the other people discuss the work? Do you have a github page? I'd love to see it.

    (The quote made me laugh!)

    Actually, the first issue where we had a lot of discussion is there : https://github.com/jp7677/dxvk-nvapi/issues/64

    After we fixed most of it, it moved over there concerning OptiX licensing and distribution : https://github.com/SveSop/wine-nvoptix/issues/10

    There are also a little bit of discussion in Wine’s Bugzilla, but nothing much.

    We haven’t heard from nvidia yet, but SveSop released a first version of wine-nvoptix. I’m waiting for a wine-staging official release so our changes are incorporated, and I’ll do the little tuto on how to install Daz. SveSop tried some thing, and it can work without dxvk-nvapi, however Daz will show strange informations about the GPU. The best will still be to use Lutris, but Daz should work now with just the last commits from wine-staging (if you want to compile it) and the installation of wine-nvoptix.

    Post edited by Moté on
  • Moté said:

    Actually, the first issue where we had a lot of discussion is there : https://github.com/jp7677/dxvk-nvapi/issues/64

    After we fixed most of it, it moved over there concerning OptiX licensing and distribution : https://github.com/SveSop/wine-nvoptix/issues/10

    That was quite a read, and a quite a journey. I am looking forward to set it up! Someone at 95zone (/threads/how-to-install-daz3d-on-linux.101227/) have already made a guide. I will see if I can make it work :)

  • MotéMoté Posts: 29
    edited January 2022

    avalentin6544 said:

    That was quite a read, and a quite a journey. I am looking forward to set it up! Someone at 95zone (/threads/how-to-install-daz3d-on-linux.101227/) have already made a guide. I will see if I can make it work :)

    Indeed, the last tuto posted seems to use the right libraries, although it’s hard to guess with all the links being censured

    In fact, it’s quite easy now :

    1. Use wine-staging-rc6 : I don’t think any distro currently packages it (not on Archlinux, so…). In that case, you need to compile it, refer to https://wiki.winehq.org/Wine-Staging
    2. Install wine-nvoptix in you wine prefix, by downloading the release at https://github.com/SveSop/wine-nvoptix/releases and following the instructions on https://github.com/SveSop/wine-nvoptix

    These 2 steps are enough to get dforce and GPU rendering working. However, you will have 2 CUPA capables devices listed. Uncheck the one having a strange name, and check the one correctly named.

    But the easier way to do this is to use Lutris. Sadly, for now they didn’t release the last patches on the dxvk-nvapi packaged in the Lutris Runtime. You can still place a personnalised dxvk-nvapi inside the Lutris Runtime, but you’ll need to compile it. Edit: jp7677 juste released a new version, so you don’t have to compile it by yourself. You can place in the Lutris Runtime, next to the other installation packaged by Lutris. Inside the Lutris runner configuration, you’ll just have to type the name of the folder. But Lutris should package the new version soon.


    Even if I spent hours trying to make Daz work and getting some debug logs, all the work has mainly been done by these people :

    Be sure to send them a thank if you get the occasion

    Post edited by Moté on
  • avalentin6544avalentin6544 Posts: 12
    edited January 2022

    I got it working! Lutris didn't play ball, but just using wine-staging, winetricks, dxvk and dxvk-nvapi did the trick. No PostgreeSQL CMS errors or anything. It just worked. Very nice!

    See the less than inspiring iray viewport for proof.

    EDIT: I should probably also install wine-nvoptix too. It was for dForce, no?
    Btw I am on wine-staging-rc9, that works as well, so any rc bigger than 6 is probably fine.

    EDIT2: Okay.. I was a bit hasty there... It is only using CPU. Getting a error for GPU :(

    "rend error: Cannot render: found no usable devices.
    2022-01-28 19:19:42.856 Iray Render error: Invalid parameters (NULL pointer)."

    Screenshot from 2022-01-28 19-02-01.png
    1920 x 1080 - 644K
    Post edited by avalentin6544 on
  • MotéMoté Posts: 29
    edited January 2022

    Indeed, wine-nvoptix is mandatory for GPU rendering. It’s OpenCL that was needed for dforce, and it’s fixed in wine.

    Installing wine-nvoptix is really easy, simply download the release, place it where you want on your computer, and run the command. It will create symlinks in your wineprefix.

    OptiX is a library to do Ray Tracing calculations (not in real time) on your GPU.

    Post edited by Moté on
  • Moté said:

    Indeed, wine-nvoptix is mandatory for GPU rendering. It’s OpenCL that was needed for dforce, and it’s fixed in wine.

    Installing wine-nvoptix is really easy, simply download the release, place it where you want on your computer, and run the command. It will create symlinks in your wineprefix.

    OptiX is a library to do Ray Tracing calculations (not in real time) on your GPU.

    Still getting the error (with one one GPU reported that has a weird name). Might be a prime laptop thing as mentioned in your long discussion on LUID..?

  • MotéMoté Posts: 29
    edited January 2022

    avalentin6544 said:

    Still getting the error (with one one GPU reported that has a weird name). Might be a prime laptop thing as mentioned in your long discussion on LUID..?

    Can you post the names you have? You only have one GPU reported? Have you tried launching with the primerun command?

    Also, jp7677 tells me you can have a look at these (the dxvk filters): https://github.com/jp7677/dxvk-nvapi/wiki/Tips-and-tricks-for-usage-with-DXVK-NVAPI#general

    Also, are you sure dxvk-nvapi is installed? Did you compile the last version? If not, you should install the new release, the old one didn’t have the cuda fixes.

    Post edited by Moté on
  • ...also don't forget that Studio is really picky about the driver versions. Cuda version AND actual GPU driver version. This could also easily make it switch back to CPU.

  • MotéMoté Posts: 29

    It asks for a specific version of Cuda, but wine-nvcuda should report it correctly

  • avalentin6544avalentin6544 Posts: 12
    edited January 2022

    Moté said:

    Can you post the names you have? You only have one GPU reported? Have you tried launching with the primerun command?

    Also, jp7677 tells me you can have a look at these (the dxvk filters): https://github.com/jp7677/dxvk-nvapi/wiki/Tips-and-tricks-for-usage-with-DXVK-NVAPI#general

    Also, are you sure dxvk-nvapi is installed? Did you compile the last version? If not, you should install the new release, the old one didn’t have the cuda fixes.

    Pretty sure it is installed yeah.

    This is what I got:

    wine-7.0-358-g85cb1ff91ed (Staging) (RC9) - Prefix is 64-bit
    dxvk 1.9.4 - With config edit
    nvoptix 0.1
    dxvk-nvapi 0.5.1 - (There came a new one about 1 hour ago, maybe I should try that..?)

    It is for sure running on the gpu, nvidia-smi says so at least.

    jp7677 idea about dxvk filters might be worth a look.

    ---------------------------------------------------
    EDIT: updating nvapi64.dll and nvapi.dll from dxvk-nvapi 0.5.2 released an hour ago, did not help.

     

    Screenshot from 2022-01-28 22-01-15.png
    1642 x 879 - 168K
    Post edited by avalentin6544 on
  • MotéMoté Posts: 29

    Oh I just remembered, Lutris install wine-nvml with dxvk-nvapi, and it’s also necesary for the correct names. However, you should still see the GPU.

    Your wine version is strange, there isn’t a wine-staging 7.0-rc6. However, there is the official release for wine-staging 7.0.

    After that, there is only dxvk filters left to try, for all I know for the moment.

  • MotéMoté Posts: 29

    Hello guys,

    I got wine-staging 7.0 official release on Archlinux this morning, and I can confirm it worked for GPU rendering. However, OpenCL dforce simulation wasn’t working.

    You should still use dxvk-nvapi and nvml in you Wine prefix, but they should not be necesary, except maybe for Optimus configuration like avalentin.

  • avalentin6544avalentin6544 Posts: 12
    edited January 2022

    Got it to work on the Optimus configuration (laptop with integrated + dedicated GPU).

    Its a little weird, but it works. To run it, follow Moté's guide, but before actually starting daz, go to steam and try to start daz studio from your wine prefix using proton-experimental. For me, steam will not actually succeed in even starting daz, but it does something that makes it possible to start daz studio using regular wine from terminal, so that the GPU is detected properly. I still get 2 CUDA capables devices listed with one of them having the strange name, despite nvapi. I will try to investigate later what steam is doing. It is probably setting some environment variable.

    Can confirm that OpenCL dforce also does not work with wine-7.1 (Staging) from git.
    dxvk filters make no difference.
    --------------------------------------------------
    BENCHMARK: Now having a working setup on both windows and linux (thanks to Moté, JP7677, SveSop and Saancreed), I can compare the two. Render was 1405 x 1859 px with some SSS, see images.

    Windows render time: 1238 iterations, 4.762s init, 548.963s
    Linux wine render time: 1227 iterations, 3.663s init, 442.570s (20% speedup!)

    Render Windows - test.png
    1405 x 1859 - 2M
    Render Linux Wine - test.png
    1405 x 1859 - 2M
    Post edited by avalentin6544 on
  • MotéMoté Posts: 29

    avalentin6544 said:

    Its a little weird, but it works. To run it, follow Moté's guide, but before actually starting daz, go to steam and try to start daz studio from your wine prefix using proton-experimental. For me, steam will not actually succeed in even starting daz, but it does something that makes it possible to start daz studio using regular wine from terminal, so that the GPU is detected properly. I still get 2 CUPA capables devices listed with one of them having the strange name, despite nvapi. I will try to investigate later what steam is doing. It is probably setting some environment variable.

    Most probably, proton installs some libs under your wine-prefix, which you can then use with your classic wine. You can try to activate dxvk-nvapi debug to see which commands are called and work or not.

  • avalentin6544avalentin6544 Posts: 12
    edited January 2022

    Moté said:

    Most probably, proton installs some libs under your wine-prefix, which you can then use with your classic wine. You can try to activate dxvk-nvapi debug to see which commands are called and work or not.

    The thing is, once I reboot, whatever steam has done is gone, and I need to do the steam lunch over again.

    EDIT: steam/proton's fix is also not limited to one wineprefix. Just tested.

    Btw Moté, is the broken OpenCL dForce a regression for the newer wine-staging versions compared to rc6?

    Post edited by avalentin6544 on
  • MotéMoté Posts: 29

    A message from jp7677 for avalentin :

    may be you hit something like https://github.com/HansKristian-Work/vkd3d-proton/issues/815 so running the nvidia-modprobe command might help after booting his machine, I think this is also one of the things Proton is doing on startup.

  • Moté said:

    A message from jp7677 for avalentin :

    may be you hit something like https://github.com/HansKristian-Work/vkd3d-proton/issues/815 so running the nvidia-modprobe command might help after booting his machine, I think this is also one of the things Proton is doing on startup.

    jp7677's wisdom knows no bounds. "nvidia-modprobe -u -c=0" does indeed do the trick. Thanks a lot you two!

    Does OpenCL still work on rc6 for you Moté? If so, then I will try that next.

  • MotéMoté Posts: 29

    avalentin6544 said:

    Does OpenCL still work on rc6 for you Moté? If so, then I will try that next.

    I never tested it, to be honest. I think SveSop did, but I’m not sure. He wrote some handmade patches with love, but wine’s wizards implemented the fixes differently. That may be the reason, or there could have been other changes.

  • Motè you're THE hero. 
    Can you please share a step by step guide in how to make it work? 

    Thanks in advice!!!

  • @Moté

    Just wanted to give my personal thanks for the effort you put in.

  • MotéMoté Posts: 29

    @TheMysteryIsThePoint you’re welcome :)


    Concerning dforce, SveSop told (as I had forgotten), that with 7.0 there is a general fix, because loading of the library was broken. But Daz needs some specific extensions that have not been implemented yet.


    @Kyan001

    It’s pretty straightforward now. For Iray GPU rendering:

    1. Install Wine staging 7.0 (either by your official repositories or by any other way, like using other precompiled versions or compiling yourself)
    2. Install the wine-nvoptix library by following the instructions here: https://github.com/SveSop/wine-nvoptix
      1. Download the last release: https://github.com/SveSop/wine-nvoptix/releases
      2. Put the folder where you want to keep it on your computer
      3. Open your command line in the folder
      4. Use the command to install in your wineprefix: WINEPREFIX=/path/to/your/wine/prefix ./setup_nvoptix.sh install
    3. In Iray advanced options, select the Cuda device that has a real GPU name, and not the weird number
    4. Enjoy!
    5. Optional: install dxvk-nvapi and wine-nvml to have a better support of some things, like not have the weird Cuda device appear. Not mandatory, might have an impact on performance (on the good way), but we can’t say.
      1. dxvk-nvapi: https://github.com/jp7677/dxvk-nvapi
      2. wine-nvml: https://github.com/jp7677/dxvk-nvapi

    Concerning dforce, we have to wait for a fix to be implemented. When it’s done, you’ll just have to update wine, and nothing else. You can also compile Wine staging with the patch made by SveSop on this comment, should work: https://bugs.winehq.org/show_bug.cgi?id=46470#c47

Sign In or Register to comment.