isNvidia() false negative on hybrid laptops under proton + dxvk-nvapi (DLSS disabled, explicit DLSS.Enabled=true ignored) #1175
Labels
No labels
0.9
3rd party
bug
documentation
duplicate
enhancement
invalid
linux
master
question
undetermined
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
roman/OptiScaler2#1175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Disclaimer: I relied heavily on Claude to test/troubleshoot my issues as I couldn't find anything about this, so I'm also posting their results mostly as is since I would not be able to explain this properly.
This problem is the result of an unfortunate coincidence of how Optiscaler and proton-wineland work.
Environment
7534ad0) aswinmm.dll(manual install); a nightly (github.com/optiscaler/OptiScaler-nightly@c62a170f45) behaves the sameProblem
Optiscaler disables DLSS even though the game renders on the RTX:
Downstream effects:
OverrideNvapiDllgets set to true, DXGI spoofing stays on, andDLSS.Enabled=truein the ini has no effect, because it is only honored when detection succeeds.Cause
In the dxvk-nvapi branch,
isNvidia()(dllmain.cpp, same logic asisNvidiaViaNvapion master) loopsEnumDisplayDevicesA(NULL, i)and requiresDISPLAY_DEVICE_ACTIVEplusVEN_10DEinDeviceID. That tests which GPU the displays are attached to, not which GPU renders.On Wine, the
DeviceIDof each adapter is the PCI path of the GPU its display source was attached to, and that GPU comes from the window driver. Proton-Wineland's Wayland driver (since915c504, "winewayland.drv: Identify the compositor GPU") passes the compositor's GPU to Wine, while Proton-CachyOS with Wayland does not.WINEDEBUG=warn+system,trace+system, same prefix and launch options, Wayland enabled in both:0000 0000). Wine then falls back to the first entry of its Vulkan GPU list, which it sorts with discrete GPUs first. That picks the RTX, and the displays attach to it. Intel is added afterwards with no display.8086 9A68) because KWin runs on the Intel iGPU. The displays attach to Intel, and the RTX is only added afterwards as a GPU with no display.So on Wineland
EnumDisplayDevicesAreturns two adapters, bothPCI\VEN_8086&DEV_9A68, and noVEN_10DEis ever seen. Wine still knows about the RTX, and Optiscaler's own DXGI hook logs it with vendor0x10deshortly after, but that information isn't available insideDllMainwhereisNvidia()runs.The same setup works on Wineland with Wayland disabled (that driver also passes no ID, so the fallback picks the RTX) and on Proton-CachyOS with Wayland.
Suggestions
DLSS.Enabled=true, so users can override a wrong detection. That's a small change with low risk.0x10DE, checked lazily afterDllMain) instead of only display-attached adapters. PRIME offload setups are common, and there the display GPU and rendering GPU differ by design.I also reported this on proton-wineland since I initially thought it was an issue with that, but informing the compositor's gpu isn't really wrong behavior. I know it's not really a big issue, especially considering it's a linux problem on hybrid laptops, and there a few things I can do to get it working (running a different proton,disabling wayland or having the compositor run on my dgpu), but I'd be nice if I could get it running on this specific setup. I really like how proton-wineland is handling wayland related things lately.
I'll be happy to test patches if it ever gets to that.