Wine ported to OpenBSD
Porting the Windows compatibility layer Wine to OpenBSD has enabled modern games like The Witcher 3 and Disco Elysium to run on the traditionally security-focused BSD system, relying on updated AMD/Intel graphics drivers and Vulkan-based tooling. Contributors explain the deep technical work required—such as trapping and rewriting `%gs` instructions, re-routing signals, and working around OpenBSD’s strict ptrace and process isolation model—while noting Wine upstream is reluctant to officially support another OS. The project also becomes a flashpoint for broader questions about OpenBSD’s stance on AI-assisted code, long-term maintainability, and whether rejecting LLM-generated contributions will leave smaller operating systems “behind” in terms of features and hardware support.
Porting effort and technical approach
- Wine has been ported to OpenBSD/amd64 and can run demanding games (e.g., Witcher 3 remaster, Disco Elysium, Hollow Knight, Prey, Death Stranding, Factorio).
- Key OpenBSD-specific work:
- Handling the
%gsregister: OpenBSD traps%gsinstructions because%gs/gsbaseare 0, so the port decodes trapped instructions, rewrites them to non‑%gsforms using scratch registers, and jumps via stubs. This unlocks most basic Windows apps and many games. - Dealing with
ucontext, stack mapping,mmap, and trap context so the%gslogic knows where to operate. - Signal handling: OpenBSD disallows signaling a thread in another process. Wine emulates Windows thread APIs via Unix signals, so the port catches inter‑process signals and re‑emits them inside the target process (e.g., remapping to another signal).
ReadProcessMemory/WriteProcessMemoryequivalents are tricky due to OpenBSD’s security model and ptrace restrictions, especially for Electron/Chromium and Steam.
- Handling the
Upstreaming and maintenance
- Wine already supports FreeBSD and macOS, so extending to another BSD is seen as challenging but not extreme.
- Some patches are OpenBSD-only and considered too hacky or invasive to Wine’s emulated application code for upstream to accept.
- Wine maintainers reportedly hesitate to add ongoing support for another OS; OpenBSD and possibly NetBSD will likely maintain separate patches.
Graphics, drivers, and hardware support
- OpenBSD supports modern Intel and AMD GPUs with hardware-accelerated 2D/OpenGL and Vulkan via Linux-derived DRM drivers; Nvidia support is effectively limited to old, non-accelerated
nv(4)hardware. - VKD3D works if Vulkan and required extensions are present; on OpenBSD this appears to function well with AMD hardware.
- Performance is described as “acceptable” by some, but detailed benchmarks are not provided.
Tooling, repositories, and ports
- The Wine port is in the OpenBSD ports tree (CVS-based, mirrored to GitHub). The ports entry is a build recipe plus patches, not a fork of all Wine.
- There is a separate GitHub branch tracking the OpenBSD-specific Wine work; issues are being accepted there.
Community reaction and significance
- Many commenters are enthusiastic, calling it impressive work and a big step for BSD gaming and legacy Windows app support.
- Some see it as evidence BSDs are getting more attention and could become refuges from other OS trends.