Skip to content

Instantly share code, notes, and snippets.

@TheSeventhCode
Last active October 28, 2026 02:34
Show Gist options
  • Select an option

  • Save TheSeventhCode/b3bda0f8fdd7d0585e380c0d6feab30f to your computer and use it in GitHub Desktop.

Select an option

Save TheSeventhCode/b3bda0f8fdd7d0585e380c0d6feab30f to your computer and use it in GitHub Desktop.
DAZ3D on Linux

Running DAZ Studio (and dForce/Iray) on Linux — a distro-agnostic guide

DAZ Studio is a Windows application. On Linux it runs under Wine, and with a bit of extra plumbing you can get:

  • The DAZ Install Manager (DIM) and DAZ Studio itself running well
  • Iray GPU rendering (CUDA/OptiX) via NVIDIA's Windows drivers-under-Wine
  • dForce cloth/hair simulation, which depends on OpenCL
  • A content library that survives Linux's case-sensitive filesystem

This guide is distro-agnostic. Substitute your distribution's package commands where noted (apt, dnf, pacman, zypper, etc.); the underlying setup is the same.


1. Overview of the moving parts

Concern Solution
Windows compatibility Wine (staging build, 64-bit prefix)
GPU rendering (Iray) NVIDIA proprietary driver + nvidia-libs (CUDA/OptiX/NVML/NVAPI shims for Wine)
dForce simulation Linux OpenCL ICD (from the NVIDIA driver) + Wine's built-in opencl.dll, not a copied Windows DLL
Isolation/sandboxing If Wine is sandboxed, share its runtime socket directory and prefix across launches
Case sensitivity Careful content-library hygiene + Wine's case-insensitivity fallback
Compositor quirks Disable winewayland.drv, force X11/XWayland

2. Wine: pick the right build and prefix

  • Use a staging build of Wine (wine-staging, wine-tkg-staging, or your distro's -staging package), 64-bit-capable (WINEARCH=win64, a "WoW64" or dual wine64/wine build). DAZ Studio itself is 64-bit; some installers and legacy plugins are 32-bit, so you want a prefix that has both system32 and syswow64.
  • Staging matters specifically because it's what carries the CSMT/patches most nvidia-libs releases are built and tested against, and it's what ships a working built-in opencl.dll implementation that correctly proxies to the Linux OpenCL ICD loader. Plain vanilla Wine builds are hit-or-miss here — if dForce fails with "A valid OpenCL 1.2 device could not be found", the Wine build is the first thing to suspect.
  • Never winetricks opencl and never drop a Windows NVIDIA OpenCL.dll into drive_c/windows/system32 or syswow64. That overrides Wine's own OpenCL bridge and disconnects it from the Linux ICD — from experience this always broke dForce simulations.
    • Check for an accidental override: open winecfg → Libraries tab, make sure there's no manual opencl override listed.
    • Sanity check: find "$WINEPREFIX" -iname 'opencl.dll*' should show Wine's own stub DLLs (created by wineboot), not a foreign one you copied in.
  • Create the prefix explicitly once, before running DAZ, so the DLL overrides below can be applied cleanly:
    export WINEPREFIX="$HOME/.local/share/wineprefixes/daz"
    export WINEARCH=win64
    wineboot -u

Recommended environment variables

export WINEPREFIX="$HOME/.local/share/wineprefixes/daz"
export WINEARCH=win64
export WINEFSYNC=0
export WINEESYNC=0
unset WAYLAND_DISPLAY                # force X11/XWayland — see §5
export WINEDLLOVERRIDES="winewayland.drv=d;opencl=b,n"
# NVIDIA only: export __GLX_VENDOR_LIBRARY_NAME=nvidia
  • WINEDLLOVERRIDES="winewayland.drv=d" disables Wine's native Wayland driver so it falls back to X11 (see §5 on why).
  • opencl=b,n forces the built-in Wine opencl.dll first, native second — i.e. exactly the "don't let a stray native DLL win" rule above, enforced in code instead of by promise.
  • __GLX_VENDOR_LIBRARY_NAME=nvidia is an optional NVIDIA-specific setting; do not set it on AMD systems.
  • Disabling esync/fsync is a pragmatic default for stability; if your setup is solid feel free to re-enable them for performance.

3. OpenCL for dForce

dForce needs a working OpenCL 1.2+ device visible inside Wine. This is entirely a Linux-side driver concern — nvidia-libs (next section) does not provide OpenCL, only CUDA/OptiX/NVML/NVAPI.

  1. Install the vendor ICD for your GPU on the host:
    • NVIDIA: the OpenCL ICD that ships alongside the proprietary driver (e.g. nvidia-opencl-icd / a versioned package on Debian/Ubuntu, opencl-nvidia on Arch, bundled with the driver on Fedora/openSUSE).
    • AMD: rocm-opencl / mesa OpenCL (Clover/RustiCL), depending on age of card and distro.
  2. Also install the ICD loader itself if it's not pulled in automatically: ocl-icd on Arch, ocl-icd-libopencl1 on Debian/Ubuntu specifically.
  3. Verify on the host before touching Wine:
    clinfo | grep -E "Platform Name|Device Name"
    If clinfo doesn't see your GPU, Wine/DAZ never will either — fix this layer first.
  4. Point Wine at the same ICD loader Linux uses. In practice this just means the environment DAZ launches in needs:
    export LD_LIBRARY_PATH="/path/to/ocl-icd/lib:$LD_LIBRARY_PATH"
    export OCL_ICD_VENDORS="/etc/OpenCL/vendors/"   # or wherever your distro puts *.icd files
  5. In DAZ Studio: Edit → Preferences → Simulation → dForce (or the OpenCL device dropdown wherever your version surfaces it) — pick the entry with your actual GPU's name, run a trivial dForce sim (a default dress/hair preset for a few frames) as a smoke test.

4. Iray/CUDA/OptiX: installing nvidia-libs

SveSop/nvidia-libs provides Wine implementations of nvcuda, nvoptix, nvml, and nvapi — this is what lets DAZ's Iray renderer see and use your NVIDIA GPU at all under Wine.

  1. Grab a release archive from the releases page (prebuilt, no need to compile unless you want bleeding-edge).
  2. Install it into the exact prefix DAZ runs in:
    export WINEPREFIX="$HOME/.local/share/wineprefixes/daz"
    cd nvidia-libs-*/
    ./setup_nvlibs.sh install
    Re-run this after recreating the prefix, updating Wine, or updating nvidia-libs itself. Uninstall with ./setup_nvlibs.sh uninstall.
  3. Optionally also wire up NVML (nvml_setup.sh, bundled) — without it, DAZ's render-device picker may list a duplicate/"phantom" GPU adapter alongside the real one. If you see two adapters with the same name, pick the one that isn't the ghost, or install NVML support to remove the ambiguity entirely.
  4. Driver recommendation: NVIDIA proprietary driver branch 580+ for best CUDA/OptiX compatibility with current nvidia-libs releases. Older drivers may still work for older CUDA SDK levels but expect rough edges.
  5. This step is orthogonal to OpenCL/dForce (§3) — you need both: nvidia-libs for CUDA/OptiX rendering, the Linux OpenCL ICD + Wine's built-in opencl.dll for dForce.

If you're on Bottles instead of a raw prefix, nvidia-libs ships bottles-install.sh for that workflow specifically.


5. Installing DAZ Studio & DIM

  1. Get the DAZ Install Manager (DIM) installer from your DAZ account and run it through Wine once, into the prefix set up above, to install DIM itself.
  2. Use DIM (through Wine) to install DAZ Studio and your purchased content — or use a manifest/.dsx-aware content-extraction helper to unpack DAZ content archives without going through DIM's Wine GUI at all.
  3. Launch DAZ Studio with the environment from §2/§3 applied:
    wine "$WINEPREFIX/drive_c/Program Files/DAZ 3D/DAZStudio4/DAZStudio.exe"
  4. Wayland note: DAZ's Qt-based popups (dForce progress bars, render preview windows, etc.) are separate toplevel windows sharing the main window's app-id. Under native winewayland.drv, tiling/compositor rules that clip-to-geometry or otherwise manage these windows can cause Wine to unmap them, which in turn causes some compositors (niri, for example) to keep re-activating the now-invisible window and stealing focus. Simplest fix: force X11/XWayland (WINEDLLOVERRIDES=winewayland.drv=d, unset WAYLAND_DISPLAY) rather than fighting per-compositor window rules.

DIM browser authentication and Wine runtime

DIM uses browser authentication; see the official changelog.

DIM 1.5.0.38 imports d3d11.dll even when it does not need DXVK. A stale native DXVK symlink combined with a native-only d3d11 prefix override can make Qt fail to load, with missing Qt5Gui.dll or Qt5Widgets.dll reported after the initial D3D11 error. For DIM only, use d3d11=b (Wine's built-in DLL) as shown in the launcher below. Do not apply this override to DAZ Studio's graphics setup.

Some Wine builds also need WINEPATH to find Wine's matching built-in d3d11.dll. This is optional and build-specific; there is no universal Wine DLL directory. If DIM still reports a missing d3d11.dll, find the x86_64-windows directory belonging to the exact Wine build used to run DIM, and add the following line inside the launcher below, before exec wine:

export WINEPATH="/path/to/this-wine-build/lib/wine/x86_64-windows${WINEPATH:+;$WINEPATH}"

Replace the example path with the actual directory for your Wine installation. Do not use a path from a different Wine version. A healthy native Wine setup normally needs no WINEPATH.

DIM browser authentication registers the daz3dim-oauth and daz3dim-oauth-general URI schemes in Windows, with both protocols invoking DAZ3DIM.exe "%1". The Linux desktop must register a handler for both schemes and pass the complete callback URI to DIM in the same Wine prefix and Wine server as the already-running DIM process. Wine's automatically generated protocol desktop entry may run plain wine start, bypassing DIM's runtime environment and failing to reach its existing instance.

Create a launcher at ~/.local/bin/dim-launcher. It uses the wine executable found on PATH, explicitly establishes the prefix and DIM-specific overrides, and forwards the callback URI as one argument:

mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/dim-launcher" <<'EOF'
#!/usr/bin/env bash
set -eu
export WINEPREFIX="$HOME/.local/share/wineprefixes/daz"
export WINEARCH=win64
export WINEFSYNC=0
export WINEESYNC=0
export QT_OPENGL=desktop
unset WAYLAND_DISPLAY
export WINEDLLOVERRIDES="winewayland.drv=d;opencl=b,n;d3d11=b"
exec wine "$WINEPREFIX/drive_c/Program Files/DAZ 3D/DAZ3DIM1/DAZ3DIM.exe" "$@"
EOF
chmod +x "$HOME/.local/bin/dim-launcher"

If DIM is installed elsewhere, adjust the executable path. Use this launcher for the ordinary DIM entry point as well as browser callbacks. If you use a custom Wine runner instead of wine on PATH, adapt both the ordinary DIM entry point and callback launcher to use that same runner, prefix, runtime, and overrides.

Create the host desktop handler. The shell expands $HOME when writing the file, so its Exec command contains an absolute launcher path; double quotes preserve paths containing spaces. %u passes one URI argument:

mkdir -p "$HOME/.local/share/applications"
cat > "$HOME/.local/share/applications/dim-oauth.desktop" <<EOF
[Desktop Entry]
Name=DAZ Install Manager OAuth
Type=Application
NoDisplay=true
Terminal=false
Exec="$HOME/.local/bin/dim-launcher" %u
MimeType=x-scheme-handler/daz3dim-oauth;x-scheme-handler/daz3dim-oauth-general;
EOF

Register the desktop file for both URI schemes:

xdg-mime default dim-oauth.desktop x-scheme-handler/daz3dim-oauth
xdg-mime default dim-oauth.desktop x-scheme-handler/daz3dim-oauth-general

If available, update-desktop-database "$HOME/.local/share/applications" can refresh the desktop MIME database. Check both registrations:

xdg-mime query default x-scheme-handler/daz3dim-oauth
xdg-mime query default x-scheme-handler/daz3dim-oauth-general

Each should print dim-oauth.desktop. Keep DIM open and initiate a fresh browser login. After changing runtime or sandbox settings, fully close DIM and restart it with the updated launcher before starting a fresh login.

Wine uses a Unix-domain server socket under /tmp/.wine-$UID/server-dev-inode to communicate with processes in a prefix. Ordinary host Wine shares /tmp automatically. If Wine runs in a sandbox, its separate launches must share both the same prefix and the same /tmp (or the same Wine server socket directory); otherwise a callback can start a second server and DIM instance instead of reaching the waiting process. Configure the sandbox to share that runtime directory safely; do not weaken its permissions. An already-running process keeps its old runtime namespace, so restart it after changing the configuration.

The desktop-to-Wine callback dispatch can be checked with a synthetic URI such as daz3dim-oauth://callback?code=example&state=example; this does not verify account authentication. A real callback's code is a credential: do not paste it into chat, logs, or shell history.


6. Case sensitivity: the DAZ content library on Linux

DAZ/Poser content assumes Windows' case-insensitive filesystem. Linux (ext4, btrfs, etc.) is case-sensitive. This causes two distinct classes of problems:

  1. Duplicate directories that differ only by case — e.g. content installed by different tools/times creates both data/DAZ 3D/ and data/DAZ3D/, or Runtime/Textures/ and runtime/textures/. Windows would silently treat these as the same directory; Linux sees two, DAZ's asset resolver gets confused, and you get missing textures or "can't find file" errors that make no sense when you know the file is there.
  2. References inside .duf/.dsf metadata baked with a specific case that doesn't match what's actually on disk.

Finding case collisions

python3 - "$HOME/Documents/DAZ 3D/My Library" <<'PY'
from pathlib import Path
from collections import defaultdict
import sys

root = Path(sys.argv[1]).resolve()
groups = defaultdict(list)
for p in root.rglob("*"):
    groups[str(p.relative_to(root)).casefold()].append(str(p.relative_to(root)))

for names in groups.values():
    if len(names) > 1:
        print("\n".join(names), "\n---")
PY

Pay particular attention to data/, Runtime/, Runtime/Textures/, and People/ — these are the directories most often duplicated by imports/installs from mismatched sources (a Windows share, a cloud sync folder, DIM vs. manual zip extraction, etc.).

Fixing collisions

Merge, don't just delete — check contents first:

rsync -av --ignore-existing "My Library/data/DAZ3D/" "My Library/data/DAZ 3D/"
diff -qr "My Library/data/DAZ3D" "My Library/data/DAZ 3D"   # confirm merge is complete
rm -rf "My Library/data/DAZ3D"

For a pure capitalization rename on a case-sensitive filesystem, go through an intermediate name (a direct case-only mv is a no-op on some tools/setups):

mv "Textures" ".Textures.tmp" && mv ".Textures.tmp" "textures"

Preventing recurrence

  • Pick one canonical library root and configure it in DAZ Studio's Content Directory Manager pointing at the root itself (e.g. Z:\home\you\Documents\DAZ 3D\My Library), not a subdirectory like ...\Runtime or ...\Runtime\Textures.
  • If your filesystem/kernel supports it, consider ext4 casefold for the content-library directory specifically (chattr +F on an empty directory, before populating it) — this makes the directory itself behave case-insensitively like Windows/NTFS, sidestepping the whole class of bug. Do not enable it on a directory that already has colliding names; clean up first.
  • Avoid cloud-sync tools (Dropbox, etc.) or naive cross-OS copies as your source of truth for the library — they're the most common source of new case collisions. Use rsync -a with one canonical source when duplicating/migrating a library.
  • Re-scan/rebuild DAZ's content database (Content DB Maintenance) after any bulk cleanup so stale metadata doesn't linger.

7. Optional: Iray Server for headless/background rendering

If you use the standalone Iray Server (separate from DAZ Studio's interactive Iray view), it's a native Linux binary — no Wine needed — but it does need libGLU and your GPU's OpenGL driver on LD_LIBRARY_PATH. If the binary expects a conventional /usr-based filesystem, use an appropriate compatibility environment for your distribution.


8. Quick troubleshooting checklist

Symptom Likely cause Fix
DIM 1.5 fails to load Qt5Gui.dll / Qt5Widgets.dll, with d3d11.dll missing first A native-only D3D11 override or stale DXVK symlink Use DIM-only built-in D3D11 (d3d11=b); if needed, set WINEPATH to the matching Wine build's x86_64-windows directory (§5)
dForce: "A valid OpenCL 1.2 device could not be found" No host OpenCL ICD, or a native opencl.dll shadowing Wine's built-in one Install vendor OpenCL ICD; check winecfg → Libraries for a stray opencl override; clinfo should list your GPU first
Iray shows no/wrong GPU, or two adapters for one card nvidia-libs not installed in this prefix, or NVML shim missing setup_nvlibs.sh install against $WINEPREFIX; add NVML support
Iray/CUDA crashes or silently CPU-falls-back Old NVIDIA driver vs. nvidia-libs' CUDA SDK support Update driver (580+ recommended), update nvidia-libs
Textures/props "missing" that you know are installed Case-collision in content library Run the case-collision scan in §6, merge duplicates
dForce popups / render preview windows steal focus or go invisible winewayland.drv native Wayland backend fighting the compositor's window rules Force X11 via WINEDLLOVERRIDES=winewayland.drv=d + unset WAYLAND_DISPLAY
Everything worked yesterday, dForce broken today Winetricks or a manual install silently added opencl.dll to system32/syswow64 Remove it, let Wine's built-in stub regenerate via wineboot -u
DIM browser authentication does not reach the open instance Callback handler uses a different prefix/runtime or Wine server Configure both URI schemes with the launcher in §5; if sandboxed, share /tmp and the prefix across launches

References

@arcangelnew

Copy link
Copy Markdown

A heads up, DAZ just updated DIM and it now requires browser oAuth to login, so far nobody has been able to bypass it or find a workaround. You might want to add a note for that in your guide, which is excellent btw.

@TheSeventhCode

Copy link
Copy Markdown
Author

Oh, really? I'll have to test it out, I haven't done much with DAZ the past month, so I missed this completely.
Let's see what happens.

Also, thanks!

@TheSeventhCode

Copy link
Copy Markdown
Author

@arcangelnew, I made some updates and included a section to get the oauth stuff working. Basically, you need to properly pass in the application launcher link, as well as force wine to use the same directory to avoid launching multiple instances of DIM.
I made it work on my machine, I hope the fix mentioned works for others too.

@arcangelnew

Copy link
Copy Markdown

Damn you are good, really good at this stuff, it worked almost flawlessly on my setup, for anyone having issues while registering the mime-types on KDE Plasma6 it's a known issue:

/usr/bin/xdg-mime: line 885: qtpaths: command not found

This happens because xdg-utils expects the qtpaths binary (from Qt5) to detect the desktop environment, but Plasma 6 ships only qtpaths6 (the Qt6 equivalent). This causes xdg-utils to fail in detecting Plasma properly and breaks MIME type handling and default application associations.
Workaround

Creating a symlink from qtpaths6 to qtpaths resolves the issue temporarily:

sudo ln -s /usr/bin/qtpaths6 /usr/local/bin/qtpaths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment