Running Engine DJ 5.0 on Linux under Wine — custom patches that work for me

I’ve been working on getting Engine DJ 5.0.0 running reliably on Linux under Wine, and after a bit of digging into Wine’s source code I’ve ended up with four patches that together seem to make it usable for me.

A few caveats up front: These patches touch Wine’s file locking and drive management internals, which means they are messing with write operations. They work for me and I’ve tested sync to a real exFAT SD card, but this is lightly tested hobby work, not a production release. If something goes wrong with your library or your card, that’s on you. Back up your Engine Library, and music, before trying any of this. You’ll also need Linux command-line confidence to build Wine from source — this is not a download-and-run situation.

Source and build instructions: https://codeberg.org/djzogmelbourne2/wine-enginedj


What the patches fix

  1. exFAT SD card support

Out of the box, Wine doesn’t recognise exFAT as a removable filesystem. Engine DJ’s Sync Manager looks for drives that Windows considers “removable” — the kind you’d eject. Without this patch, an exFAT SD card either doesn’t appear at all or appears as the wrong drive type, and the Sync Manager just says “insert removable drive” even with the card physically present.

This patch makes Wine correctly identify an exFAT card as a removable drive so Engine DJ can see it and sync to it normally.

  1. Stable audio device identifiers

Wine normally assigns audio devices random GUIDs (identifiers) each time it starts. Engine DJ stores your audio configuration, and if the identifiers change between runs it can get confused about which device is which. This patch makes those identifiers stable and deterministic — the same device gets the same ID every time. It also adds stubs for an audio API (IDeviceTopology) that Engine DJ probes on startup, preventing some unnecessary error noise.

  1. Fix for Engine DJ hanging on quit after sync

This one took the most work to understand. Engine DJ uses SQLite databases for its library, and when you sync to an SD card both the local and card libraries are being written at the same time. Wine’s file locking had a flaw: when multiple parts of the program were waiting for the same database file, they’d all be woken up simultaneously when the lock was released, leading to a thundering-herd situation that could deadlock. Engine DJ would appear to finish syncing but then hang indefinitely when you tried to quit — the only way out was to force-kill it.

The fix replaces Wine’s “wake everyone up at once” approach with a queue — one waiter is signalled at a time, in order. It also adds detection for a specific SQLite deadlock pattern (two threads each waiting for a lock the other holds) and resolves it cleanly rather than stalling forever. With this patch, Engine DJ quits normally after sync, and general responsiveness during imports and playlist operations is noticeably improved.

  1. SD card doesn’t hijack extra drive letters

When Wine starts with a USB SD card reader attached, a background thread talks to the Linux device manager (udev/udisks2) and tries to automatically assign Windows drive letters to any removable media it finds. For an SD card, this was creating a spurious extra drive letter (D: or F:) pointing at the card in addition to the A: drive I’d deliberately configured. Engine DJ would then see two or three entries for the same card.

The root cause is that Wine’s auto-assignment code only scans from C: onwards when checking whether a device already has a letter, so it never notices that A: is already pointing to the same card. There’s also a secondary issue: the auto-assigned letter had the wrong drive type, so the Sync Manager couldn’t use it anyway.

This patch does two things: adds a full A–Z pre-scan so the existing A: mapping is found and honoured, and suppresses automatic drive-letter creation entirely for media that Wine can’t positively identify as a known removable type (which includes exFAT). The SD card appears exactly where you put it and nowhere else.


How it’s set up

The repo includes launch scripts that configure the Wine prefix in two modes:

  • Sync mode — maps the SD card as A: so Engine DJ can see and sync to it
  • Edit mode — no SD card mapping, for quieter local library editing without the card visible

The build guide in the repo walks through building Wine from source and applying the patches. You’ll need a working Linux build environment and some patience — it’s not hard but it’s not quick either.

Again: back up your library, this is at your own risk!

additional patch added -

Patch 5: PRIME GO remote-library send timeout Engine DJ can serve tracks to Denon DJ hardware over its HTTP export server. Under Wine, larger FLAC downloads to a PRIME GO could fail or retry because Engine DJ sets SO_SNDTIMEO=5000 on the download socket, and Wine’s overlapped socket send path could turn a slow-but-progressing large transfer into STATUS_IO_TIMEOUT. Engine DJ then closed the connection and the PRIME GO retried from byte zero.

The patch clamps short nonzero send timeouts upward to 60 seconds inside wineserver. This leaves Engine DJ’s socket setup intact while giving large track downloads enough time to complete. It was validated with multiple longer FLACs, including a 15 min 36 sec, 156 MB public-domain FLAC loaded and played on a Denon PRIME GO.

small update to the support scripts: Engine DJ under Wine was showing the PC free space because it used the process working directory, so the launcher now starts Engine DJ from the mounted SD card in sync mode, making Export report the correct SD card capacity.

This makes SD/USB exports work more reliably.

also: actually used an SD card created via this for a gig and all went perfectly, so passed the very lazy “it works for me” test.