Skip to content

GKMD 4.12.0

Latest

Choose a tag to compare

@4zyz4 4zyz4 released this 05 Dec 08:04
· 1 commit to main since this release

v4.12.0 — 2026-12-05 — In-box usbip-win2 driver, root-hub filter, and transport management API

English | 简体中文

GKMD 4.12.0 removes the vendor installer from the Windows transport path and
adds the root-hub filter that DualSense audio needs, together with managed and
C APIs to inspect, install, upgrade and uninstall the transport.

Highlights

  • In-box usbip-win2 host controller — the Windows build embeds the signed
    usbip2_ude.inf / .sys / .cat package under Resources/usbip/ instead of
    the 25 MB Inno installer. InstallUsbipBackend stages the package, registers
    ROOT\USBIP_WIN2\UDE with SetupDi and installs it through
    UpdateDriverForPlugAndPlayDevices(INSTALLFLAG_FORCE). The vendor installer,
    its Apps entry and its extension INF are never run or installed.
  • Root-hub filter for DualSense audio — usbip2_filter.sys runs as
    GKMDUsbipFilter on GKMD's own host controller root hub only. It answers
    usbaudio.sys's QueryBusTime, so a shared-mode render keeps its 10 ms
    speaker periods instead of taking them in 20 ms pairs, and it forwards
    select-configuration, select-interface and pipe-reset to the host controller.
    The hub is restarted for the filter only while it carries no device, under a
    cross-process gate shared with VhciClient.Attach. The vendor extension INF,
    which would add the filter to every USB 3 root hub, is never installed.
  • Transport management API — GKContext.GetUsbipBackendStatus() reports
    presence, IOCTL ABI (0.9.8.1 / 0.9.8.0 / 0.9.7.x / in-kernel), pinned
    package, NeedsUpgrade, pending reboot and root-hub filter state.
    InstallUsbipBackend() installs or repairs; UpgradeUsbipBackend() moves a
    supported older usbip-win2 to the pinned 0.9.8.1; UninstallUsbipBackend(force)
    removes only what GKMD installed: its filter, the devnode it registered, the
    package it added, the staged files and the install record.
  • Old releases stay usable — 0.9.7.x and 0.9.8.0 are still auto-detected and
    can create controllers. The upgrade is explicit and optional; it is what
    enables the pinned driver and the root-hub filter. An upgrade or uninstall
    refuses while devices are attached, unless force is passed.
  • Smaller Windows build — the x64 NativeAOT DLL drops from 29,291,520 to
    4,770,304 bytes and the x64 zip from 26,806,626 to 2,208,634 bytes.
  • Leftover controllers recovered — a machine with several driverless
    ROOT\USB usbip-win2 devnodes (interrupted installs or an old vendor node)
    now keeps one and removes the rest before installing, instead of refusing to
    install a driver on several at once.

Artifacts

File Size Notes
GKMD-v4.12.0-windows-x64.zip 2,208,634 bytes Windows x64: GKMD.dll (4,770,304 bytes, NativeAOT PE, embeds usbip2_ude + usbip2_filter.sys), gkmd.h, LICENSE, THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-windows-arm64.zip 2,107,540 bytes Windows ARM64: GKMD.dll (4,884,992 bytes, NativeAOT PE, embeds usbip2_ude + usbip2_filter.sys), gkmd.h, LICENSE, THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-linux-x64.zip 1,709,311 bytes Linux x64: libGKMD.so (3,440,336 bytes, NativeAOT ELF, no driver payload), gkmd.h, LICENSE, THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-linux-arm64.zip 1,635,498 bytes Linux ARM64: libGKMD.so (3,571,344 bytes, NativeAOT ELF, no driver payload), gkmd.h, LICENSE, THIRD-PARTY-NOTICES.txt

SHA-256:

  • GKMD-v4.12.0-windows-x64.zip: 1A19F981026759CF2BEFADDA3C9C1C9A8ECF51997BFCD8FFA859572216FC9EFE
  • GKMD-v4.12.0-windows-arm64.zip: 0EC9F8537F325EE62B8584EF171DAB7FFEF39ECABB04BED68A0FCB974A214246
  • GKMD-v4.12.0-linux-x64.zip: A2AC08E5E0680A30A7860073148CA950E0AED06E7D6384DD8291CD774CF46AB0
  • GKMD-v4.12.0-linux-arm64.zip: 66BF4E05DC848388A71BDC820102365D2F5CD623C57182C92E3BDB491BCFAF90

Build / verify

dotnet build -c Release for both net10.0-windows and net10.0, and all four
PackageRelease builds, compile with 0 warnings and 0 errors. The Windows
packages were built on Windows (x64 and ARM64); the Linux packages on WSL
Ubuntu. A Windows Sandbox clean run installed the transport, loaded
GKMDUsbipFilter, attached a DualSense (including its MEDIA audio interface),
ran UpgradeUsbipBackend, removed everything with UninstallUsbipBackend, and
installed again. The native ABI's gkmd_context_backend_status /
gkmd_context_uninstall_backend path was exercised in the same sandbox;
gkmd_version returns 4.12.0.

Notes

  • A direct install, upgrade or uninstall needs an elevated process. The old
    vendor installer raised UAC itself; the SDK now reports the requirement.
  • The filter is attached only when the host controller runs the pinned 0.9.8.1
    package. Older supported releases still create controllers but keep the
    filter unavailable until upgraded.
  • On Linux, uninstall throws: vhci_hcd is the running kernel's module and is
    shared with every other USB/IP user. Use sudo rmmod vhci_hcd only when no
    USB/IP device is in use.

v4.12.0 — 2026-12-05 — 内嵌 usbip-win2 驱动、root-hub filter 与传输管理 API

GKMD 4.12.0 从 Windows 传输路径中去掉了厂商安装器,并加入 DualSense 音频所需的
root-hub filter;同时提供托管 API 与 C ABI,用于查询、安装、升级和卸载传输。

主要改动

  • 内嵌 usbip-win2 主机控制器 —— Windows 构建不再带 25 MB 的 Inno 安装器,
    改为在 Resources/usbip/ 下嵌入签名的 usbip2_ude.inf / .sys / .cat。
    InstallUsbipBackend 暂存这些文件,用 SetupDi 注册 ROOT\USBIP_WIN2\UDE,
    再通过 UpdateDriverForPlugAndPlayDevices(INSTALLFLAG_FORCE) 安装。厂商安装器、
    它的 Apps 卸载项和扩展 INF 都不会被运行或安装。
  • DualSense 音频所需的 root-hub filter —— usbip2_filter.sys 以
    GKMDUsbipFilter 服务只运行在 GKMD 自己的 host controller root hub 上。它替
    usbaudio.sys 回答 QueryBusTime,让共享模式播放保持 10 ms 的扬声器周期,
    而不是按 20 ms 成对提交;同时把 select-configuration、select-interface 和
    pipe-reset 转给 host controller。只有 hub 上没有设备时才为加载 filter 重启它,
    并持有与 VhciClient.Attach 共享的跨进程门。会给所有 USB 3 root hub 加 filter
    的厂商扩展 INF 从不安装。
  • 传输管理 API —— GKContext.GetUsbipBackendStatus() 报告是否存在、IOCTL
    ABI(0.9.8.1 / 0.9.8.0 / 0.9.7.x / in-kernel)、是否 pinned、
    NeedsUpgrade、是否需重启和 root-hub filter 状态。InstallUsbipBackend()
    负责安装或修复;UpgradeUsbipBackend() 把受支持的旧版 usbip-win2 升到 pinned
    0.9.8.1;UninstallUsbipBackend(force) 只移除 GKMD 自己装的东西:filter、
    注册的 devnode、它添加的驱动包、暂存文件和安装记录。
  • 旧版仍可用 —— 0.9.7.x 与 0.9.8.0 仍会被自动探测并能创建控制器;升级是显式、
    可选的,只用于启用 pinned 驱动和 root-hub filter。还有设备 attach 时,升级或
    卸载会拒绝执行,除非传 force。
  • Windows 产物显著变小 —— x64 NativeAOT DLL 从 29,291,520 字节降到
    4,770,304 字节,x64 zip 从 26,806,626 字节降到 2,208,634 字节。
  • 遗留控制器可自动恢复 —— 机器上存在多个无驱动的 ROOT\USB
    usbip-win2 devnode(中断的安装或旧版厂商节点)时,会保留一个并删除其余
    节点后再安装驱动,不再直接拒绝。

构建产物

文件 大小 说明
GKMD-v4.12.0-windows-x64.zip 2,208,634 字节 Windows x64:GKMD.dll(4,770,304 字节,NativeAOT PE,内嵌 usbip2_ude + usbip2_filter.sys)、gkmd.h、LICENSE、THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-windows-arm64.zip 2,107,540 字节 Windows ARM64:GKMD.dll(4,884,992 字节,NativeAOT PE,内嵌 usbip2_ude + usbip2_filter.sys)、gkmd.h、LICENSE、THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-linux-x64.zip 1,709,311 字节 Linux x64:libGKMD.so(3,440,336 字节,NativeAOT ELF,无驱动载荷)、gkmd.h、LICENSE、THIRD-PARTY-NOTICES.txt
GKMD-v4.12.0-linux-arm64.zip 1,635,498 字节 Linux ARM64:libGKMD.so(3,571,344 字节,NativeAOT ELF,无驱动载荷)、gkmd.h、LICENSE、THIRD-PARTY-NOTICES.txt

SHA-256:

  • GKMD-v4.12.0-windows-x64.zip:1A19F981026759CF2BEFADDA3C9C1C9A8ECF51997BFCD8FFA859572216FC9EFE
  • GKMD-v4.12.0-windows-arm64.zip:0EC9F8537F325EE62B8584EF171DAB7FFEF39ECABB04BED68A0FCB974A214246
  • GKMD-v4.12.0-linux-x64.zip:A2AC08E5E0680A30A7860073148CA950E0AED06E7D6384DD8291CD774CF46AB0
  • GKMD-v4.12.0-linux-arm64.zip:66BF4E05DC848388A71BDC820102365D2F5CD623C57182C92E3BDB491BCFAF90

构建 / 验证

两个 TFM(net10.0-windows / net10.0)以及四个 PackageRelease 构建均为
0 warning / 0 error。Windows 包在 Windows 上构建(x64 与 ARM64),Linux 包在
WSL Ubuntu 上构建。Windows Sandbox 干净安装验证了:安装传输、加载
GKMDUsbipFilter、创建 DualSense(含 MEDIA 音频接口)、执行
UpgradeUsbipBackend、用 UninstallUsbipBackend 完整移除、然后重新安装。
native ABI 的 gkmd_context_backend_status / gkmd_context_uninstall_backend
也在同一 Sandbox 中验证;gkmd_version 返回 4.12.0。

说明

  • 直接安装、升级或卸载都需要提权。旧厂商安装器会自己弹 UAC;现在由 SDK 报告该要求。
  • filter 只在 host controller 运行 pinned 0.9.8.1 包时挂载。旧版仍可创建控制器,
    但 filter 会保持不可用,直到升级。
  • Linux 上的卸载会抛异常:vhci_hcd 是运行中内核的模块,被所有 USB/IP 用户共享。
    仅在确认没有 USB/IP 设备使用时,才用 sudo rmmod vhci_hcd。