felixdoerre / primus_vk

Vulkan GPU-offloading layer
BSD 2-Clause "Simplified" License
230 stars 17 forks source link

Assertion "!status && "vkSetLatencySleepModeNV"" on dual nvidia GPU #94

Open ajunca opened 1 week ago

ajunca commented 1 week ago

Can not run many games on steam through proton using pvkrun on my dual GPU system. Or they just don't launch or it gives an assertion:

Screenshot_20241016_000943

I have two graphics cards, GTX 1080 with the monitor attached to it and one RTX 3090. My system is Arch running KDE desktop. The command I use to use the GTX 1080 as display and the RTX 3090 as rendering is: PRIMUS_VK_DISPLAYID=10de:1b80 PRIMUS_VK_RENDERID=10de:2204 pvkrun %command%

Running the steam games without pvkrun (display and render on the GTX 1080) works fine. Also running other non steam apps with this command (ex. vkcubes) also work fine (doing the rendering on the RTX 3090 and displaying through GTX 1080).

I tried on X11 and Wayland. On Wayland not even vkcubes is working. Also tried with different version of proton (Experimental, GE, 9.0...)

Any recommendation on how to solve this issue?

felixdoerre commented 1 week ago

You can give this branch a try.

For further debugging, the output of vulkaninfo and pvkrun vulkaninfo would be nice.

I assume in all cases where it is not working you get this exact assertion error, am I right?

ajunca commented 1 week ago

Ok thanks, I will try that branch.

vulkaninfo: vkinfo.txt

PRIMUS_VK_DISPLAYID=10de:1b80 PRIMUS_VK_RENDERID=10de:2204 pvkrun vulkaninfo: pvkrun_vkinfo.txt

EDIT: I tried the branch and no luck.... In this case it appears as kind of silent crash. I get one of both, or the assertion or a silent crash. For example, in Hunt Showdown I get the following output (and it works if I run with the GTX 1080):


pressure-vessel-wrap[70078]: W: Not sharing path STEAM_COMPAT_TOOL_PATHS="...:/usr/share/steam/compatibilitytools.d/proton-ge-custom:..." with container because "/usr" is reserved by the container framework
fsync: up and running.
PrimusVK: Searching for display GPU:
PrimusVK: 0x555555c27e10: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x555555c27e10.
PrimusVK: 0x555555c27e30.
PrimusVK: 0x555555c28790.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x555555c28860: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x555555c28860.
PrimusVK: 0x555555de2510.
PrimusVK: 0x555555de2530.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Searching for display GPU:
PrimusVK: 0x5555559d9410: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x5555559d9410.
PrimusVK: 0x5555559d9430.
PrimusVK: 0x5555557ceb10.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55555593f050: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55555593f050.
PrimusVK: 0x555555e290f0.
PrimusVK: 0x555555e29110.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
chdir "/home/junky/.local/share/Steam/steamapps/common/Hunt Showdown 1896"
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Adding process 70246 for gameID 594650
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Adding process 70247 for gameID 594650
Adding process 70248 for gameID 594650
pressure-vessel-wrap[70247]: W: Not sharing path STEAM_COMPAT_TOOL_PATHS="...:/usr/share/steam/compatibilitytools.d/proton-ge-custom:..." with container because "/usr" is reserved by the container framework
ProtonFixes[70338] INFO: Running protonfixes
ProtonFixes[70338] INFO: Running checks
ProtonFixes[70338] INFO: All checks successful
Adding process 70338 for gameID 594650
ProtonFixes[70338] INFO: Using global defaults for "Hunt: Showdown 1896" (594650)
ProtonFixes[70338] INFO: No global protonfix found for "Hunt: Showdown 1896" (594650)
fsync: up and running.
Adding process 70339 for gameID 594650
Adding process 70340 for gameID 594650
Adding process 70341 for gameID 594650
Adding process 70344 for gameID 594650
Adding process 70346 for gameID 594650
Adding process 70349 for gameID 594650
Adding process 70359 for gameID 594650
Adding process 70372 for gameID 594650
Adding process 70378 for gameID 594650
PrimusVK: Searching for display GPU:
PrimusVK: 0x55557b666620: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55557b666620.
PrimusVK: 0x55557b666660.
PrimusVK: 0x55557b6667d0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55557a77ad20: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55557a77ad20.
PrimusVK: 0x55557c6981b0.
PrimusVK: 0x55557c6981f0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Searching for display GPU:
PrimusVK: 0x55557c0ba120: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55557c0ba120.
PrimusVK: 0x55557c0ba160.
PrimusVK: 0x55557c0ba1b0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55557aca2be0: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55557aca2be0.
PrimusVK: 0x55557bed7c30.
PrimusVK: 0x55557bed7c70.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
Adding process 70395 for gameID 594650
Setting breakpad minidump AppID = 594650
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561197966563059 [API loaded no]
Adding process 70412 for gameID 594650
PrimusVK: Searching for display GPU:
PrimusVK: 0x55556a534e70: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55556a534e70.
PrimusVK: 0x55556a534eb0.
PrimusVK: 0x55556a535020.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: fetching dispatch for 0x55556a54c3a0
PrimusVK: Creating display device finished!: 0
PrimusVK: fetching dispatch for 0x55556a54a9a0
PrimusVK: CreateDevice done
Fossilize INFO: Overriding serialization path: "/home/junky/.local/share/Steam/steamapps/shadercache/594650/fozpipelinesv6/steamapprun_pipeline_cache".
PrimusVK: Application requested 3 images.
PrimusVK: Creating Swapchain for size: 800x450
PrimusVK: MinImageCount: 3
PrimusVK: fetching device for: 0x55556a54a9a0
PrimusVK: FamilyIndexCount: 0
PrimusVK: Dev: 0x55556a54c3a0
PrimusVK: Swapchainfunc: 0x708a1727ee50
PrimusVK: >> Swapchain create done 0;0x55556bc94230
PrimusVK: Min Images: 2
PrimusVK: Image aquiring: 3
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating a Swapchain thread.
PrimusVK: Count: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
PrimusVK: >> Destroy swapchain: 0x55556bc94230
PrimusVK: Application requested 3 images.
PrimusVK: Creating Swapchain for size: 800x450
PrimusVK: MinImageCount: 3
PrimusVK: fetching device for: 0x55556a54a9a0
PrimusVK: FamilyIndexCount: 0
PrimusVK: Dev: 0x55556a54c3a0
PrimusVK: Swapchainfunc: 0x708a1727ee50
PrimusVK: >> Swapchain create done 0;0x55556bdbcd80
PrimusVK: Min Images: 2
PrimusVK: Image aquiring: 3
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating a Swapchain thread.
PrimusVK: Count: 3
pid 70342 != 70341, skipping destruction (fork without exec?)
Game 594650 created interface STEAMAPPLIST_INTERFACE_VERSION001 / AppList
Game 594650 created interface STEAMAPPS_INTERFACE_VERSION008 / Apps
Game 594650 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_004 / HTMLSurface
Game 594650 created interface STEAMHTTP_INTERFACE_VERSION002 / HTTP
Game 594650 created interface STEAMINVENTORY_INTERFACE_V002 / Inventory
Game 594650 created interface STEAMMUSICREMOTE_INTERFACE_VERSION001 / MusicRemote
Game 594650 created interface STEAMMUSIC_INTERFACE_VERSION001 / Music
Game 594650 created interface STEAMPARENTALSETTINGS_INTERFACE_VERSION001 / ParentalSettings
Game 594650 created interface STEAMREMOTESTORAGE_INTERFACE_VERSION014 / RemoteStorage
Game 594650 created interface STEAMSCREENSHOTS_INTERFACE_VERSION003 / Screenshots
Game 594650 created interface STEAMUGC_INTERFACE_VERSION010 / UGC
Game 594650 created interface STEAMUSERSTATS_INTERFACE_VERSION011 / UserStats
Game 594650 created interface STEAMVIDEO_INTERFACE_V002 / Video
Game 594650 created interface SteamController006 / Controller
Game 594650 created interface SteamFriends015 / Friends
Game 594650 created interface SteamMatchMaking009 / Matchmaking
Game 594650 created interface SteamMatchMakingServers002 / MatchmakingServers
Game 594650 created interface SteamNetworking005 / Networking
Game 594650 created interface SteamUser019 / User
Game 594650 created interface SteamUtils009 / Utils
Game 594650 method call count for IClientAppManager::GetCurrentLanguage : 1
Game 594650 method call count for IClientAppManager::GetAvailableLanguages : 1
Game 594650 method call count for IClientAppManager::GetAppInstallDir : 1
Game 594650 method call count for IClientAppManager::GetAppInstallState : 2
Game 594650 method call count for IClientUtils::RecordSteamInterfaceCreation : 22
Game 594650 method call count for IClientUtils::GetSteamUILanguage : 1
Game 594650 method call count for IClientUtils::GetAppID : 24
Game 594650 method call count for IClientUser::GetSteamID : 1
Uploaded AppInterfaceStats to Steam
Removing process 70412 for gameID 594650
Removing process 70395 for gameID 594650
Removing process 70378 for gameID 594650
Removing process 70372 for gameID 594650
Removing process 70359 for gameID 594650
Removing process 70349 for gameID 594650
Removing process 70346 for gameID 594650
Removing process 70344 for gameID 594650
Removing process 70341 for gameID 594650
Removing process 70340 for gameID 594650
Removing process 70339 for gameID 594650
Removing process 70338 for gameID 594650
Removing process 70248 for gameID 594650
Removing process 70247 for gameID 594650
Removing process 70246 for gameID 594650
felixdoerre commented 1 week ago

Ok, the output of vulkaninfo confirms, that the general idea of "hiding" the incompatible extensions can be useful. You've got a far newer nvidia driver than me supporting the extensions in question, that's why the issue does not occur for me.

I've given a "blind" solution attempt another try where I hide the extension more thoroughly, so you can try the updated branch again.

ajunca commented 6 days ago

Still not working (silent crash). Need some output of any run or similar?

I don't know if its of much of help to know this, but I managed to run the games with the 3090 as rendering and the 1080 as display, using docker (using the docker-steam-headless image). This kinds of verify that the problem is with primus-vk or the stack it uses.

As before, I attach the output of trying to run "Hunt: Showdown 1896" (not sure if its different).

wine: using kernel write watches, use_kernel_writewatch 1.
fsync: up and running.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
PrimusVK: Searching for display GPU:
PrimusVK: 0x5555715b0310: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x5555715b0310.
PrimusVK: 0x5555715b0330.
PrimusVK: 0x5555715b0bb0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55557159d500: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55557159d500.
PrimusVK: 0x5555711209b0.
PrimusVK: 0x5555711209d0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Searching for display GPU:
PrimusVK: 0x555571067280: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x555571067280.
PrimusVK: 0x5555710672a0.
PrimusVK: 0x5555715f89e0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x555571527d30: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x555571527d30.
PrimusVK: 0x555571620a30.
PrimusVK: 0x555571620a50.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
chdir "/home/junky/steam-headless/games/steamapps/common/Hunt Showdown 1896"
ERROR: ld.so: object '/home/junky/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Adding process 25803 for gameID 594650
wine: using kernel write watches, use_kernel_writewatch 1.
fsync: up and running.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
PrimusVK: Searching for display GPU:
PrimusVK: 0x55555efec950: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55555efec950.
PrimusVK: 0x55555efec990.
PrimusVK: 0x55555efecb00.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55555e10ba20: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55555e10ba20.
PrimusVK: 0x5555601ad250.
PrimusVK: 0x5555601ad290.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Searching for display GPU:
PrimusVK: 0x55555fbcfe30: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55555fbcfe30.
PrimusVK: 0x55555fbcfe70.
PrimusVK: 0x55555fbcfec0.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Suppressing GetRandROutputDisplay
PrimusVK: Searching for display GPU:
PrimusVK: 0x55555e46cf00: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x55555e46cf00.
PrimusVK: 0x55555ffccd30.
PrimusVK: 0x55555ffccd70.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
wine: using kernel write watches, use_kernel_writewatch 1.
wine: using kernel write watches, use_kernel_writewatch 1.
Setting breakpad minidump AppID = 594650
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561197966563059 [API loaded no]
wine: using kernel write watches, use_kernel_writewatch 1.
PrimusVK: Searching for display GPU:
PrimusVK: 0x555559c85160: 4318;7040
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce GTX 1080
PrimusVK:   Type: 2
PrimusVK: Searching for render GPU:
PrimusVK: 0x555559c85160.
PrimusVK: 0x555559c851a0.
PrimusVK: 0x555559c85310.
PrimusVK: Got device from env!
PrimusVK: Device: NVIDIA GeForce RTX 3090
PrimusVK:   Type: 2
PrimusVK: fetching dispatch for 0x555559c9c460
PrimusVK: Creating display device finished!: 0
PrimusVK: fetching dispatch for 0x555559c9aa60
PrimusVK: CreateDevice done
Fossilize INFO: Overriding serialization path: "/home/junky/steam-headless/games/steamapps/shadercache/594650/fozpipelinesv6/steamapprun_pipeline_cache".
PrimusVK: Application requested 3 images.
PrimusVK: Creating Swapchain for size: 800x450
PrimusVK: MinImageCount: 3
PrimusVK: fetching device for: 0x555559c9aa60
PrimusVK: FamilyIndexCount: 0
PrimusVK: Dev: 0x555559c9c460
PrimusVK: Swapchainfunc: 0x73a9f61b9e50
PrimusVK: >> Swapchain create done 0;0x55555b3e39d0
PrimusVK: Min Images: 2
PrimusVK: Image aquiring: 3
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating a Swapchain thread.
PrimusVK: Count: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
PrimusVK: >> Destroy swapchain: 0x55555b3e39d0
PrimusVK: Application requested 3 images.
PrimusVK: Creating Swapchain for size: 800x450
PrimusVK: MinImageCount: 3
PrimusVK: fetching device for: 0x555559c9aa60
PrimusVK: FamilyIndexCount: 0
PrimusVK: Dev: 0x555559c9c460
PrimusVK: Swapchainfunc: 0x73a9f61b9e50
PrimusVK: >> Swapchain create done 0;0x55555b5899a0
PrimusVK: Min Images: 2
PrimusVK: Image aquiring: 3
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating image: 800x450
PrimusVK: Creating a Swapchain thread.
PrimusVK: Count: 3
Game 594650 created interface STEAMAPPLIST_INTERFACE_VERSION001 / AppList
Game 594650 created interface STEAMAPPS_INTERFACE_VERSION008 / Apps
Game 594650 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_004 / HTMLSurface
Game 594650 created interface STEAMHTTP_INTERFACE_VERSION002 / HTTP
Game 594650 created interface STEAMINVENTORY_INTERFACE_V002 / Inventory
Game 594650 created interface STEAMMUSICREMOTE_INTERFACE_VERSION001 / MusicRemote
Game 594650 created interface STEAMMUSIC_INTERFACE_VERSION001 / Music
Game 594650 created interface STEAMPARENTALSETTINGS_INTERFACE_VERSION001 / ParentalSettings
Game 594650 created interface STEAMREMOTESTORAGE_INTERFACE_VERSION014 / RemoteStorage
Game 594650 created interface STEAMSCREENSHOTS_INTERFACE_VERSION003 / Screenshots
Game 594650 created interface STEAMUGC_INTERFACE_VERSION010 / UGC
Game 594650 created interface STEAMUSERSTATS_INTERFACE_VERSION011 / UserStats
Game 594650 created interface STEAMVIDEO_INTERFACE_V002 / Video
Game 594650 created interface SteamController006 / Controller
Game 594650 created interface SteamFriends015 / Friends
Game 594650 created interface SteamMatchMaking009 / Matchmaking
Game 594650 created interface SteamMatchMakingServers002 / MatchmakingServers
Game 594650 created interface SteamNetworking005 / Networking
Game 594650 created interface SteamUser019 / User
Game 594650 created interface SteamUtils009 / Utils
Game 594650 method call count for IClientAppManager::GetCurrentLanguage : 1
Game 594650 method call count for IClientAppManager::GetAvailableLanguages : 1
Game 594650 method call count for IClientAppManager::GetAppInstallDir : 1
Game 594650 method call count for IClientAppManager::GetAppInstallState : 2
Game 594650 method call count for IClientUtils::RecordSteamInterfaceCreation : 22
Game 594650 method call count for IClientUtils::GetSteamUILanguage : 1
Game 594650 method call count for IClientUtils::GetAppID : 24
Game 594650 method call count for IClientUser::GetSteamID : 1
Uploaded AppInterfaceStats to Steam
Removing process 25803 for gameID 594650
felixdoerre commented 5 days ago

Need some output of any run or similar?

If this is actually a segfault, some gdb backtrace of that would be helpful, so we can see which components/functions are involved and if this is still the game trying to use VK_NV_low_latency2 even though I try to signal that this is not supported. Or even just a confirmation that this is a segfault/crash and not the application exiting "gracefully". We could also check if VKD3D_DEBUG=trace gives any reasonable output, that might give hits to what exactly stops the game.

The reason I am trying to hide this extensions is, that all its functions require a Swapchain and a Device argument. The way primus_vk exposes vulkan objects to the application, however, the Swapchain will be from the display device and the Device will be from the rendering device. So the functions do not recognize the passed object and fail.

I am not sure what the scenario is with docker-steam-headless. Do you just run the container (with its own X-Server on the dedicated GPU) and then use Steam in-Home streaming to see the output? If that's so, then everything in the container only sees vulkan objects of the target GPU, which allows VK_NV_low_latency2 to work (not that it would give any benefit in this situation).

I am also not sure, if the game/application in the stack, that decides to use VK_NV_low_latency2, is correctly checking for its absence (looks like it, given the error "changed") and continues without this extensions or if it aborts the application "gracefully", insisting there should be VK_NV_low_latency2, given that this is an nvidia card, that e.g. has even newer nvidia extensions. My current suspicion is, that it would be vkd3d (https://github.com/HansKristian-Work/vkd3d-proton/blob/65b81403435576d882d9141ae3eb4a29373fba0e/libs/vkd3d/swapchain.c#L3096). However the logic, checking for support here, looks fine to me. Which version of proton are you using, and did you try with older versions, that will not have implemented anything VK_NV_low_latency2-related?

Another road down, instead of hiding VK_NV_low_latency2 I could try to implement a mock version of it, that just accepts the calls and pretends the latency settings were reduced, and instead does nothing. From the vulkan documentation of those functions, this seems possible, but I am not sure.

ajunca commented 5 days ago

I'm currently away from home, so I will try debugging with gdb later to capture more details.

Regarding the use of docker-steam-headless, there are a few options. My current setup isn’t for streaming but uses an X11 socket to connect the X11 client with the host. The Docker image runs a desktop environment (in this case, XFCE), and I pass the GPU to the container, which runs applications via X11. It can either create its own X11 instance or use the host’s. The container's X11 applications are rendered as regular windows on the host using a file socket on Xwayland. The entire container desktop can also be displayed as X11 windows if needed. Copy-paste functionality works as expected, and it behaves like a typical X11 host application. My setup works on Wayland, though I couldn't get it to work properly while running X11 on the host, likely due to my KDE configuration. In this setup, the Docker instance only recognizes the RTX 3090 GPU. I should note that making this work wasn't trivial, and certain configurations (such as running the Docker instance as privileged) resulted in crashes similar to this issue, where games silently fail. Running in non-privileged mode resolved the issue.

I have no specific information regarding VK_NV_low_latency2. However, I can confirm that this issue occurs across different engines, including Unreal Engine games (e.g., Forever Winter). Hunt: Showdown 1896 uses the latest CryEngine and exhibits the same issue. Some games do work, though I can’t recall all of them right now—The Long Dark (using Unity) I think it worked in my case, though I’m not certain which version of Unity it was using. If needed, I can install other games to further test and provide more detailed feedback.

I tested different proton versions, specifically GE, Experimental (with and without bleeding edge) and 9. Can you specify which version does not have VK_NV_low_latency2?

felixdoerre commented 5 days ago

If needed, I can install other games to further test and provide more detailed feedback.

I am not sure we need more games for now. If it actually comes from vkd3d-proton that might explain part of the behavior, but I don't know the inner workings of most games (engine, dx10/11/12/vulkan, ...) to draw any conclusions from that. Ideally we would make any game work, so having a single one with a backtrace on what it's doing is enough for now.

I believe it was added here (https://github.com/HansKristian-Work/vkd3d-proton/commit/0eb04f89c560e28acd352f05b727ad4c6ddb5b45), to expose dx12 low-latency support via KV_NV_low_latency2 and that seems to not be in proton <= 8 (so that might "workaround" games using dx12 low latency). The low-latency extension in winevulkan seems to be absent for proton <= 7 (so that might "workaround" games using vulkan low-latency a different way).