Skip to content

Launcher under Wine / Proton: adapter not recognised with Wine's own DXGI #37

Open

Description

@phantoslayer21

Discussion #10 reports that under Wine with Wine's own dxgi.dll the launcher sees the graphics card under a generic
older name and refuses it; with DXVK's dxgi.dll it works. Look at how the launcher identifies a supported Radeon RX
9000-series card (name or PCI IDs) and whether it can identify the card reliably under Wine, or say clearly which DXGI
it needs.

Related: Discussion #10, #29

Activity

  1. added this to the Later milestone on Nov 13, 2026
  2. j0nsh1n commented on Nov 13, 2026

    @j0nsh1n
    Contributor

    Here's what I found and a fix I tested.

    How the launcher identifies the card: it uses the DXGI adapter name only (IsRdna4Name). With DXVK's DXGI the name is right ("AMD Radeon RX 9070 XT (RADV GFX1201)"). That's what the launcher gets when it's started with proton run, because Proton puts DXVK's dxgi.dll into the prefix. Wine's own DXGI can give an older Radeon's name instead, and then the card is refused.

    Fix: fall back to Linux's PCI ids under Wine. Z: maps the Linux root, so the launcher can read Z:\sys\class\drm\cardN\device\vendor and device. Vendor 0x1002 with device 0x7550, 0x7551, 0x7590 or 0x7591 is RDNA 4, the same list as rdna4_device_id in rr_runtime.cpp. One detail: sysfs files report a size of 4096 bytes even when they hold only a few, so ReadAll's size check fails on them; read to the end of the file instead.

    wstring LinuxRdna4Name() {   // wg_core/checks.cpp; DetectGpu uses it when !best.rdna4 && UnderWine()
        for (int i = 0; i < 16; ++i) {
            const wstring dev = L"Z:\\sys\\class\\drm\\card" + std::to_wstring(i) + L"\\device\\";
            string vendor, device;   // ReadSysfs: CreateFileW + ReadFile until EOF (at most 256 bytes)
            if (!ReadSysfs(dev + L"vendor", vendor) || !ReadSysfs(dev + L"device", device)) continue;
            const unsigned long v = strtoul(vendor.c_str(), nullptr, 16), d = strtoul(device.c_str(), nullptr, 16);
            if (v == 0x1002 && (d == 0x7550 || d == 0x7551 || d == 0x7590 || d == 0x7591)) {
                wchar_t b[96];
                swprintf(b, 96, L"AMD Radeon RDNA 4 (PCI 1002:%04lX, as Linux reports it)", d);
                return b;
            }
        }
        return L"";
    }
    // UnderWine(): GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "wine_get_version") != nullptr

    Outside Wine, Z:\sys doesn't exist and the fallback never runs.

    Tested:

    • wg_core_tests (llvm-mingw build) under GE-Proton 11-11's Wine on an RX 9070 XT: LinuxRdna4Name() is non-empty exactly when Linux reports an RDNA 4 card, and DetectGpu then reports RDNA 4. The check failed with the id list emptied.
    • Launcher installs with proton run passed the card check under GE-Proton 11-11, Proton 11.0 and Proton-CachyOS.
    • Not run on Windows.

    The change with its tests is in PR #105: commit 01b2523, which needs only 677af52 (UnderWine()).

  3. modified the milestones: Later, 0.6.2 on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    • Status
      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions