Files
kinect/docs/troubleshooting.md
T
kinect-botandsisyphus-dev-ai d8b0db4e59 docs: document the real spice2x "Kinect bypass" mechanism
The user hit "spice2x won't launch" which turned out to be DEA's boot-time
Kinect presence check hanging then exiting cleanly after ~20s (full AVS2
boot, I/O hooks via Wine HID all succeed, then xrpc dispose with no crash
signature - easy to mistake for a launch failure). They looked for a
"Kinect bypass" option in spicecfg and couldn't find it, because it isn't a
built-in checkbox - it's a community runtime JSON patch
(github.com/JoeKoh27/danevo-patches), imported through spicecfg's Patches
tab -> Import from URL. Verified by fetching the patch repo directly.

docs/setup-windows.md step 5 and docs/troubleshooting.md now spell out the
exact mechanism (Patches tab, import URL, enable Kinect bypass, the specific
gamekdm.dll build it targets) instead of just saying "enable the Kinect
bypass option", which was accurate in substance but too vague about where
to find it.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-30 10:43:06 -05:00

7.2 KiB

Troubleshooting

Common failures and what to check. Grouped by symptom.

The player is mirrored, or moves invert (left/right swapped)

The mirror bit is wrong. A raw camera image is left/right flipped relative to how a Kinect presents the scene, and the mirror flag corrects it.

  • Redo the mirror-confirm calibration step (docs/calibration.md, step 1): raise only your anatomical right arm and let the tracker set the flag.
  • The mirror toggles map to the Kinect depth/video hflip registers (0x17 depth, 0x47 video). If you set them by hand, confirm you flipped the depth stream, not just color.
  • If scoring is directionally inverted in DEA but the silhouette looks correct, it is still the mirror: the skeleton's left/right joints are swapped. Recalibrate mirror, do not touch scale.

The player drops out / "player lost" mid-session

The tracker lost the subject (left frame, occluded, or poor light). The pipeline is built to hold the last good frame briefly and recover on its own, event/heartbeat driven, without crashing the host app (plan todo 17, IS-8).

  • Step back into full frame; tracking should re-acquire within a second or two.
  • Improve lighting; a low-visibility pose publishes joints marked inferred and holds, rather than emitting garbage.
  • If the tracker process actually died, the emitter keeps serving a safe no-player frame (tracking id 0), so the game sees "no skeleton" instead of hanging. Restart the tracker; no host restart needed.
  • Persistent dropouts with the subject clearly in frame usually mean the capture resolution or fps is too low for the model tier. Re-measure fps at your real capture resolution and prefer the full tier.

Depth is out of range or flat (no articulation)

The host tracker needs articulated depth inside the Kinect band (roughly 800 to 4000 mm), not a flat wall.

  • Run the Linux e2e harness (tools/e2e_linux_validation/run_e2e.py). It fails loudly with "depth is not articulated" if the per-frame spread is under 100 mm, which means depth pegged flat.
  • Flat depth at ~800 mm is the old placeholder behavior. Live depth is routed through the core/mapping Z0 + depthGain placement (plan todo 21) so it varies per joint across the body. If you see flat depth, confirm the tracker is publishing through mapping, not the raw pass-through.
  • Out-of-band depth (everything 0, or clipped) usually means Z0 is wrong: recalibrate the T-pose so your standing distance sets the depth origin inside the 0.8 to 4.0 m clamp.
  • The depth packing is 11-bit at 640x480 by default (register 0x12 = 0x03); a consumer expecting a different mode reads garbage. Match the consumer's requested mode.

The OpenNI2 driver is not discovered (Linux)

libOpenNI2.so finds drivers only in <libdir>/OpenNI2/Drivers, by scanning for *.so.0 files. There is no OPENNI2_DRIVERS_PATH env var honored by this build.

  • Confirm libSynthKinect.so.0 is in ~/.local/openni2-root/usr/lib/x86_64-linux-gnu/OpenNI2/Drivers/. The cmake --build fallback/linux-openni2/build step copies it there automatically; re-run the build if it is missing.
  • Set LD_LIBRARY_PATH to the OpenNI2 lib dir when running a consumer: LD_LIBRARY_PATH=$HOME/.local/openni2-root/usr/lib/x86_64-linux-gnu.
  • If OPENNI2_ROOT is not the default $HOME/.local/openni2-root, override the CMake cache var so the driver deploys into your actual install's OpenNI2/Drivers.

MediaPipe fails to load (Linux)

  • libGLESv2.so.2 missing: stage it user-space (see docs/setup-linux.md, step 2b) and prepend ~/.cache/kinect/gllibs to LD_LIBRARY_PATH.
  • No model bundle: fetch the .task tiers into tracker/models/ (step 2a).
  • Wrong Python: MediaPipe 1.x has no wheel for system Python 3.14 here; use the uv-created Python 3.12 venv at tracker/.venv.

The Windows device never binds / Device Manager shows usbip, not Kinect

  • Verify-KinectDevice.ps1 reporting the service as usbip* means the VHCI stub attached but the MS Kinect driver did not match the descriptors. Confirm the Kinect for Windows Runtime + SDK v1.8 is actually installed (it provides kinect*.inf), and that all three busids (1-1, 1-2, 1-3) are attached, not just the camera. An incomplete sensor can make NuiCreateSensorByIndex reject it.
  • If a self-built/test-signed driver will not load: you omitted a signing step. Confirm bcdedit /set testsigning on ran, Secure Boot is OFF in firmware, and the test certificate is imported into both LocalMachine Root and TrustedPublisher. The "Test Mode" watermark confirms test-signing is active; its absence after reboot means it did not take. This is exactly the failure the Windows guide's signing section exists to prevent.
  • Prefer the signed usbip-win2 client first; it usually needs no test-signing at all.

DEA will not boot under test mode / spice2x blocks it

  • Enable spice2x's Kinect-bypass option so the game clears its boot-time Kinect presence check.
  • Test-signing plus an injected Kinect10.dll shim can trip anti-tamper. Confirm spice2x tolerates the virtual device before concluding the driver or shim failed.

spice2x boots DEA but no window ever appears (exits cleanly after ~20s)

This looks like "spice2x won't launch" but it's actually DEA's boot-time Kinect presence check blocking and then timing out. The log shows a full AVS2 boot (ea3-config, I/O hooks, HID mouse/ keyboard) and stops cleanly at xrpc: dispose: done roughly 20 seconds after ea3_boot: complete

  • no crash signature, no missing-DLL dialog, nothing - because it self-exits rather than crashing.

The fix is spice2x's "Kinect bypass" - not a built-in checkbox, a community runtime JSON patch imported through spicecfg's Patches tab -> Import from URL -> https://joekoh27.github.io/danevo-patches/ -> enable Kinect bypass. See docs/setup-windows.md step 5 for the exact steps. It targets one specific gamekdm.dll build (KDM-2016080100 / PE id KDM-5784d760_1d897b); a different build may need a different patch source.

kinect-tracker.exe crashes or shows no cameras under Wine

tracker-native/ uses Windows Media Foundation for webcam capture, and Wine's MFEnumDeviceSources is a hard stub for video capture devices (always returns zero devices; see the Wine source dlls/mf/main.c). The tracker then null-derefs on the empty device list - this is the Unhandled page fault ... starting debugger crash you get running kinect-tracker.exe under Wine. It is a Wine limitation, not something to chase in our code. If you're running DEA under Wine on Linux, don't run the native tracker under Wine at all - run the Linux Python tracker natively and bridge it to the shim through a real file. See docs/linux-wine.md.

Isochronous framing rejected on Windows

The shared USB/IP server models the camera ISO IN endpoints as single packets without the iso_packet_descriptor array. If the Windows VHCI + MS Kinect driver reject that, the fix is in the shared core/ + attach/linux ISO path (reused by Windows), not a Windows-only change. See attach/windows/docs/approach.md section 5. If USB/IP cannot carry the ISO streams at all, drop to the Kinect10.dll NUI shim for playability (it does not prove enumeration).