Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux #1571

Open
Patola opened this issue Jun 14, 2020 · 116 comments
Open

Linux #1571

Patola opened this issue Jun 14, 2020 · 116 comments
Labels

Comments

@Patola
Copy link

Patola commented Jun 14, 2020

Is there any way to get revive running on Linux?
Valve Index works on Linux perfectly through SteamVR. Which now offers OpenXR.
But I'd like to play Asgard's Wrath and other oculus-exclusive games. And I will not sign the Microsoft EULA and install Windows.

@fholger
Copy link
Contributor

fholger commented Jun 14, 2020

Can you even install the Oculus runtime and get it running through Wine? If not, then that's already a show stopper. If yes, you could try to install one of the free games from the Oculus store and then run the ReviveInjector.exe manually through Wine.

I'd say chances are slim, but depending on which step breaks, there may or may not be options.

@Patola
Copy link
Author

Patola commented Jun 14, 2020

Oh. I see... Tried both the legacy runtime and the newer one. Didn't even install...

@fholger
Copy link
Contributor

fholger commented Jun 14, 2020

Then I'm afraid, until Oculus decides to support Linux as a platform, there's nothing to be done...

@BoofOof32
Copy link

it's a shame not much can be done here. I'm very interested in seeing Oculus Rift games working on Linux someday. There's not much I can do feasibly by myself, but I could at least get a conversation going on what hurdles would need to be overcome to make Rift games a possibility.

So it's already established that the lack of a runtime is an immediate non-starter, so a few solutions may come to mind. Either...
A.) the Oculus Runtime is reverse engineered somehow
B.) the games are tricked into running on a different runtime (like Monado perhaps)

Honestly I'm mostly spitballing ideas, of course neither of these would be easy, but I thought I'd get the conversation going. Some feedback or responses would be appreciated 🙂

@CrossVR
Copy link
Member

CrossVR commented Oct 2, 2022

(B) Is exactly what Revive does by translating Oculus SDK calls to OpenVR or OpenXR.

Proton already has support for OpenVR and OpenXR. And since you can theoretically run Revive under Proton it doesn't need a Linux port.

Your main obstacle is getting the Oculus store to work, but Steam has some Oculus exclusives itself. So all that's needed is for someone to try it.

@ShadowJonathan
Copy link

Has anyone tried running revive under proton, and successfully downloaded and launched a game from the oculus store using that?

@BoofOof32
Copy link

I might be onto something.

So I got SteamVR installed and ALVR going, now onto Revive. I added the installer as a Non-Steam game, ran through proton, which then installed Revive into it's own prefix in ~/.steam/steam/steamapps/compatdata/2539255137/pfx/. I then went to the properties of the installer and redirected the target to ReviveOverlay.exe. To my surprise, doing that made the Revive icon appear on the dashboard in SteamVR.
Screenshot_20221002_181503

Now of course it can't find any Oculus games, as the Oculus Launcher isn't installed, so I yanked Lone Echo from my Windows drive and tried to see if I could inject it.
Screenshot_20221002_181230
I'm not super surprised as there's no Oculus SDK to really initialize.

I have one more idea, and that is to copy my entire Oculus install into Revive's Proton prefix in the hope that it'll detect the installed games, but otherwise, I'm not sure what else I could do here.

I'll be back to report my findings

@BoofOof32
Copy link

alright, so unfortunately, taking my Oculus Launcher install and putting it into the same prefix as Revive didn't really change anything 🙁. The games didn't appear on the dashboard, and injecting still doesn't do anything.

I'd love some more ideas or suggestions, but I'm not quite sure what else I could do.

@CrossVR
Copy link
Member

CrossVR commented Oct 3, 2022

@BoofOof32 Simply copying the Oculus launcher install won't work, because the Oculus runtime will not have installed correctly. Try actually installing the Oculus Store in the same prefix as Revive. Though I'm not sure if running Oculus Store games will even work under wine, because it needs a background service running for platform functionality like entitlement checks.

It's probably easier to start with a Steam game that only has Oculus SDK support if you have any of those. All you need then is the xinput proxy, the Revive DLL and a wine DLL override. I've started an appveyor build that includes the xinput proxy, I'll add some instructions for this part later. Do you have an Oculus-only title in your Steam library?

@BoofOof32
Copy link

I would try installing the Oculus launcher, however, there's still some bugs in Wine that would need to be resolved before that's feasible. There's a workaround to bypass the error that there's "not enough disk space", but after a few GB in, it errors out in another way

I'm digging around for Oculus only titles on Steam, but they're hard to find, and I don't have any on me. If someone could link a game like that (ideally free or cheap), that'd be appreciated

@BoofOof32
Copy link

also, i just realized that latest commit didn't build successfully in Appveyor, strange

@CrossVR
Copy link
Member

CrossVR commented Oct 3, 2022

Yeah my bad, forgot I deleted the xinput proxy at one point. Anyway might be better to try a standalone Oculus app then? You can just run that using the injector.

For games from the Oculus store you'll indeed need to wait for Wine to fix it, there's nothing for Revive to do there.

@BoofOof32
Copy link

Ok, so I did manage to find one Oculus only SteamVR game, that being DiRT Rally. Even though It's "VR supported" according to Steam, however it doesn't appear as one in my actual library.

I made sure to run the Windows version of DiRT Rally, and when I'm VR, it will only run in standard flatscreen mode. Injecting it with Revive didn't seem to do really do much, in fact, it didn't even open the game. Scrounging around the games files, I see no mention of anything VR or Oculus related, so I'm wondering why the store page said it supported it to begin with. I may be missing a step potentially.

@CrossVR
Copy link
Member

CrossVR commented Oct 4, 2022

Ok, so for that one you'll need to install Revive 2.1.1 and follow these instructions: https://github.com/LibreVR/Revive/wiki#standalone--steam-games-alternative

Make sure to follow the 32-bit instructions as Dirt Rally is a 32-bit game.

@BoofOof32
Copy link

hmm, I'm not sure what I'm doing wrong. I gave the game the 3 DLLs mentioned above. But I'm still not having any luck with it. Whether I'm starting from Steam or injecting again :/

@CrossVR
Copy link
Member

CrossVR commented Oct 4, 2022

My bad, forgot to mention you need to add this to the launch options for Dirt Rally in Steam:

WINEDLLOVERRIDES="xinput1_3=n,b" %command%

@BoofOof32
Copy link

sorry for the late response, I tried the launch command, no dice sadly. Still launches normally. I'm wondering if I should install Revive in the same prefix as DiRT Rally. I'm not so sure

@BoofOof32
Copy link

it's been a hot minute since I came back here, but I'm throwing in the towel for now. I think for now, if we want to have any chance of this happening, the Wine bugs will need to be fixed for the Oculus Launcher. I will continue to maintain the appdb page for it on Winehq, but otherwise, I won't be much of use here :(

@Oman395
Copy link

Oman395 commented Jan 16, 2023

Jumping in 3 months later, and thanks to the archwiki I found oculus wine wrapper which seems promising, I'll report back in a bit once I get home and actually test it. I'm pretty sure it's based on the old 2017 version of the oculus SDK for linux, so I'm not quite sure how well it will work (especially for newer titles), but who knows? It might work great.

E: apparently im bad at links

@twhitehead
Copy link

twhitehead commented Mar 3, 2023

I have been looking at getting Condor 2 working. It is a standalone application, so that should simplify some things. The issue I am currently facing is Condor 2 is 32 bit and Revive is 64 bit.

Ideally this shouldn't matter, but Revive uses Detours to inject itself into the application to hook the oculus calls. Detours generally seems to work under Linux. Here is, for example, an example of using it via ReviveInjector.exe to inject revive into the 64bit putty.exe

$ wine Program\ Files/Revive/ReviveInjector.exe putty64.exe
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
Launched injector with: "C:\Program Files\Revive\ReviveInjector.exe" putty64.exe
Command for injector is: putty64.exe
Succesfully injected!
0118:fixme:ver:GetCurrentPackageId (000000000011FDA0 0000000000000000): stub

and the putty GUI comes up and works fine.

When you try and launch the 32 bit putty though, things go sideways

$ wine Program\ Files/Revive/ReviveInjector.exe putty32.exe
Launched injector with: "C:\Program Files\Revive\ReviveInjector.exe" putty32.exe
Command for injector is: putty32.exe
wine: Unhandled page fault on write access to 00400000 at address 1001047E (thread 014c), starting debugger...
0168:fixme:imm:ImeSetActiveContext (00030056, 1): stub
0168:fixme:imm:ImmReleaseContext (0003005A, 00030056): stub
0154:fixme:imm:ImeSetActiveContext (0000000000020030, 0): stub
0154:fixme:imm:ImmReleaseContext (00000000000200AA, 0000000000020030): stub

and a popup comes up saying

The program rundll32.exe has encountered a serious problem and needs to close. We are sorry for the inconvenience.

Looking through the code, it seems rundll32.exe is used as a shim when there is a 32/64bit mismatch between the Detours application (ReviveInjector.exe) and the target application (Condor2.exe). So so much for 32/64. Given that 64/64 works though, it seems reasonable that 32/32 probably works as well. If I could just get my hands on a 32bit version of ReviveInjector.exe or Detours (which provides withdll.exe for also launching a programming and injecting a dll into it) I could test this.

And that is the problem. If it was all Linux, I would just build it myself. Neither of these projects seem setup for cross compilation, and I don't have Windows (the last time I seriously used it was NT 4). So I am posting here in case anyone has any ideas. If I don't hear anything, I will probably try and modify this project (which works by using detours under wine to do a dll injection) at some point as it comes with some cross compilation instructions and might be easily modify to inject the 32bit revive dll. (had a look and it #ifdefs out detours with gcc).

@CrossVR
Copy link
Member

CrossVR commented Mar 4, 2023

I wonder if you could use wine's built-in dll replacement mechanism. Ultimately the reason the injector is needed is so LibOVRRT32_1.dll is replaced with LibRevive32.dll.

So you could potentially rename LibRevive32.dll to LibOVRRT32_1.dll, then place it in the folder for wine's built-in DLLs and then configure wine to use the built-in DLL rather than the native one. Using this method you shouldn't ever need to run the injector, you can just run the game executable directly.

For that to work though there still needs to be a copy of the original LibOVRRT32_1.dll somewhere in the DLL search path. So make sure you either install the Oculus software under wine or grab a copy of the original DLL somewhere and place it next to the game executable.

@twhitehead
Copy link

Thanks. I will see if I can make that work. Out of curiosity, why is the original version still required somewhere on the DLL search path?

@CrossVR
Copy link
Member

CrossVR commented Mar 4, 2023

Every application, unless built with the latest SDK, does a signature check on the LibOVR DLL in its search path before attempting to load the DLL. If it can't find the DLL or the code signature chain doesn't match the Oculus one it will refuse to load.

@twhitehead
Copy link

twhitehead commented Mar 8, 2023

Thanks. I tried a variety of things, but, even without trying to do any redirects, it looks to be failing at the verification stage. Putting just LibOVRRT32_1.dll in the windows/system32 folder and running with WINEDEBUG=+wintrust,+loaddll,+file,+reg gives

  1. it logs Oculus Rift initialization started (to the condor log file) and then looks for LibOVRRT32_1.dll
0024:trace:file:RtlDosPathNameToNtPathName_U_WithStatus (L"C:\\Condor2\\LibOVRRT32_1.dll",0021EA38,00000000,00000000)
0024:trace:file:RtlGetFullPathName_U (L"C:\\Condor2\\LibOVRRT32_1.dll" 520 0021E7E8 00000000)
0024:trace:file:nt_to_unix_file_name_no_root L"Condor2\\LibOVRRT32_1.dll" not found in /home/tyson/.wine-condor/dosdevices/c:/Condor2
0024:warn:file:NtQueryAttributesFile L"\\??\\C:\\Condor2\\LibOVRRT32_1.dll" not found (c0000034)
0024:trace:file:RtlDosPathNameToNtPathName_U_WithStatus (L".\\LibOVRRT32_1.dll",0021EA38,00000000,00000000)
0024:trace:file:RtlGetFullPathName_U (L".\\LibOVRRT32_1.dll" 520 0021E7E8 00000000)
0024:trace:file:nt_to_unix_file_name_no_root L"Condor2\\LibOVRRT32_1.dll" not found in /home/tyson/.wine-condor/dosdevices/c:/Condor2
0024:warn:file:NtQueryAttributesFile L"\\??\\C:\\Condor2\\LibOVRRT32_1.dll" not found (c0000034)
0024:trace:file:RtlDosPathNameToNtPathName_U_WithStatus (L"C:\\windows\\system32\\LibOVRRT32_1.dll",0021EA38,00000000,00000000)
0024:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\LibOVRRT32_1.dll" 520 0021E7E8 00000000)
0024:trace:file:nt_to_unix_file_name_no_root L"\\??\\C:\\windows\\system32\\LibOVRRT32_1.dll" -> "/home/tyson/.wine-condor/dosdevices/c:/windows/system32/LibOVRRT32_1.dll"
0024:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\LibOVRRT32_1.dll" 520 0021EC64 00000000)
0024:trace:file:SearchPathW found L"C:\\windows\\system32\\LibOVRRT32_1.dll"
0024:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\LibOVRRT32_1.dll" 520 0021F074 00000000)
0024:trace:file:CreateFileW L"C:\\windows\\system32\\LibOVRRT32_1.dll" GENERIC_READ FILE_SHARE_READ  creation 3 attributes 0x1
0024:trace:file:RtlDosPathNameToNtPathName_U_WithStatus (L"C:\\windows\\system32\\LibOVRRT32_1.dll",0021EA40,00000000,00000000)
0024:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\LibOVRRT32_1.dll" 520 0021E748 00000000)
0024:trace:file:NtCreateFile handle=0x21ea3c access=80100080 name=L"\\??\\C:\\windows\\system32\\LibOVRRT32_1.dll" objattr=00000040 root=(nil) sec=(nil) io=0x21ea48 alloc_size=(nil) attr=00000001 sharing=00000001 disp=1 options=00000060 ea=(nil).0x00000000
0024:trace:file:nt_to_unix_file_name_no_root L"\\??\\C:\\windows\\system32\\LibOVRRT32_1.dll" -> "/home/tyson/.wine-condor/dosdevices/c:/windows/system32/LibOVRRT32_1.dll"
0024:trace:file:CreateFileW returning 00000134
  1. it loads wintrust.dll and dependencies (omitted) and then calls WinVerifyTrust on LibOVRRT32_1.dll
...
0024:trace:wintrust:WinVerifyTrust (FFFFFFFF, {00aac56b-cd44-11d0-8cc2-00c04fc295ee}, 0021E58C)
0024:trace:wintrust:dump_wintrust_data 0021E58C
0024:trace:wintrust:dump_wintrust_data cbStruct: 52
0024:trace:wintrust:dump_wintrust_data pPolicyCallbackData: 00000000
0024:trace:wintrust:dump_wintrust_data pSIPClientData: 00000000
0024:trace:wintrust:dump_wintrust_data dwUIChoice: 2
0024:trace:wintrust:dump_wintrust_data fdwRevocationChecks: 00000000
0024:trace:wintrust:dump_wintrust_data dwUnionChoice: 1
0024:trace:wintrust:dump_file_info 0021E5C0
0024:trace:wintrust:dump_file_info cbStruct: 16
0024:trace:wintrust:dump_file_info pcwszFilePath: L"C:\\windows\\system32\\LibOVRRT32_1.dll"
0024:trace:wintrust:dump_file_info hFile: 00000134
0024:trace:wintrust:dump_file_info pgKnownSubject: (null)
0024:trace:wintrust:dump_wintrust_data dwStateAction: 1
0024:trace:wintrust:dump_wintrust_data hWVTStateData: 00000000
0024:trace:wintrust:dump_wintrust_data pwszURLReference: (null)
0024:trace:wintrust:dump_wintrust_data dwProvFlags: 00000010
0024:trace:wintrust:dump_wintrust_data dwUIContext: 0
0024:trace:wintrust:WINTRUST_DefaultVerify (FFFFFFFF, {00aac56b-cd44-11d0-8cc2-00c04fc295ee}, 0021E58C)
  1. it makes many many crypto calls (omitted) before finally returning success (0)
...
0024:trace:wintrust:WINTRUST_DefaultVerify returning 00000000
0024:trace:wintrust:WinVerifyTrust returning 00000000
  1. it looks into the details of the signatures (I think this is what goes south)
0024:trace:wintrust:WTHelperProvDataFromStateData 008D55D0
0024:trace:wintrust:WTHelperGetProvSignerFromChain (008D55D0 0 0 0)
0024:trace:wintrust:WTHelperGetProvSignerFromChain returning 008EBC60
  1. then it closes out the WinVerifyTrust operation
0024:trace:wintrust:WinVerifyTrust (FFFFFFFF, {00aac56b-cd44-11d0-8cc2-00c04fc295ee}, 0021E58C)
0024:trace:wintrust:dump_wintrust_data 0021E58C
0024:trace:wintrust:dump_wintrust_data cbStruct: 52
0024:trace:wintrust:dump_wintrust_data pPolicyCallbackData: 00000000
0024:trace:wintrust:dump_wintrust_data pSIPClientData: 00000000
0024:trace:wintrust:dump_wintrust_data dwUIChoice: 2
0024:trace:wintrust:dump_wintrust_data fdwRevocationChecks: 00000000
0024:trace:wintrust:dump_wintrust_data dwUnionChoice: 1
0024:trace:wintrust:dump_file_info 0021E5C0
0024:trace:wintrust:dump_file_info cbStruct: 16
0024:trace:wintrust:dump_file_info pcwszFilePath: L"C:\\windows\\system32\\LibOVRRT32_1.dll"
0024:trace:wintrust:dump_file_info hFile: 00000134
0024:trace:wintrust:dump_file_info pgKnownSubject: (null)
0024:trace:wintrust:dump_wintrust_data dwStateAction: 2
0024:trace:wintrust:dump_wintrust_data hWVTStateData: 008D55D0
0024:trace:wintrust:dump_wintrust_data pwszURLReference: (null)
0024:trace:wintrust:dump_wintrust_data dwProvFlags: 00000010
0024:trace:wintrust:dump_wintrust_data dwUIContext: 0
0024:trace:wintrust:WINTRUST_DefaultClose (FFFFFFFF, {00aac56b-cd44-11d0-8cc2-00c04fc295ee}, 0021E58C)
0024:trace:wintrust:WINTRUST_DefaultClose returning 00000000
0024:trace:wintrust:WinVerifyTrust returning 00000000
  1. it repeats all these steps again and then logs ovr_Initialize failed with error: ovr_Initialize never called.

Nowhere in the logs are any loaddll related logs for LibOVRRT32_1.dll. It seems it never actually tries to load the dll, which is why I am guessing it didn't like something coming out of the verification (step 4) even though the system reported that it succeeded (step 2 and 3).

@twhitehead
Copy link

A a note, Condor comes with a LibOVR.dll. This library exports a subset of the symbols that LibOVRRT32_1.dll does. I assume it is responsible for the loading of LibOVRRT32_1.dll and probably mostly just a passthrough, so I tried replacing it with LibRevive32.dll on the off chance that would work. This just generated an invalid address exception.

@twhitehead
Copy link

twhitehead commented Mar 12, 2023

The issue with the verification is that CertGetNameStringW is called to retrieve the issuer on the elements of the certificate chain using the CERT_NAME_ATTR_TYPE with pvTypePara set to NULL. The behaviour of this is undocumented and Windows retrieves the common name while Wine retrieves the email (enable the +crypt debug stream to see this).

For the subject it sets pvTypePara to szOID_COMMON_NAME (which is the proper way to get the common name) and both Windows and Wine retrieve the common name as they should. Here is some of the output of a test program I wrote to dump the results of walking the certificate chain and making these two call on Wine

chain                          0
  element                        0
    subject (CN)                   Oculus VR, LLC
    issuer (0)                     
  element                        1
    subject (CN)                   DigiCert SHA2 Assured ID Code Signing CA
    issuer (0)                     
  element                        2
    subject (CN)                   DigiCert Assured ID Root CA
    issuer (0)                     

and what you get on Windows

chain                          0
  element                        0
    subject (CN)                   Oculus VR, LLC
    issuer (0)                     DigiCert SHA2 Assured ID Code Signing CA
  element                        1
    subject (CN)                   DigiCert SHA2 Assured ID Code Signing CA
    issuer (0)                     DigiCert Assured ID Root CA
  element                        2
    subject (CN)                   DigiCert Assured ID Root CA
    issuer (0)                     DigiCert Assured ID Root CA

For the record, here is the complete chain

Issuer
  CERT_SIMPLE_NAME_STR           US, DigiCert Inc, www.digicert.com, DigiCert SHA2 Assured ID Code Signing CA
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.10=DigiCert Inc, 2.5.4.11=www.digicert.com, 2.5.4.3=DigiCert SHA2 Assured ID Code Signing CA
  CERT_X500_NAME_STR             C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert SHA2 Assured ID Code Signing CA
Subject
  CERT_SIMPLE_NAME_STR           US, California, Menlo Park, "Oculus VR, LLC", "Facebook Technologies, LLC", "Oculus VR, LLC"
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.8=California, 2.5.4.7=Menlo Park, 2.5.4.10="Oculus VR, LLC", 2.5.4.11="Facebook Technologies, LLC", 2.5.4.3="Oculus VR, LLC"
  CERT_X500_NAME_STR             C=US, S=California, L=Menlo Park, O="Oculus VR, LLC", OU="Facebook Technologies, LLC", CN="Oculus VR, LLC"
Issuer
  CERT_SIMPLE_NAME_STR           US, DigiCert Inc, www.digicert.com, DigiCert Assured ID Root CA
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.10=DigiCert Inc, 2.5.4.11=www.digicert.com, 2.5.4.3=DigiCert Assured ID Root CA
  CERT_X500_NAME_STR             C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA
Subject
  CERT_SIMPLE_NAME_STR           US, DigiCert Inc, www.digicert.com, DigiCert SHA2 Assured ID Code Signing CA
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.10=DigiCert Inc, 2.5.4.11=www.digicert.com, 2.5.4.3=DigiCert SHA2 Assured ID Code Signing CA
  CERT_X500_NAME_STR             C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert SHA2 Assured ID Code Signing CA
Issuer
  CERT_SIMPLE_NAME_STR           US, DigiCert Inc, www.digicert.com, DigiCert Assured ID Root CA
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.10=DigiCert Inc, 2.5.4.11=www.digicert.com, 2.5.4.3=DigiCert Assured ID Root CA
  CERT_X500_NAME_STR             C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA
Subject
  CERT_SIMPLE_NAME_STR           US, DigiCert Inc, www.digicert.com, DigiCert Assured ID Root CA
  CERT_OID_NAME_STR              2.5.4.6=US, 2.5.4.10=DigiCert Inc, 2.5.4.11=www.digicert.com, 2.5.4.3=DigiCert Assured ID Root CA
  CERT_X500_NAME_STR             C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA

You can see these are no email fields, which is why Wine is failing to retrieve anything. Not that it would likely be accepted anyway if the common name is expected.

@CrossVR
Copy link
Member

CrossVR commented Mar 12, 2023

Nice find, sounds like something that would need to be fixed in Wine?

@twhitehead
Copy link

twhitehead commented Mar 14, 2023

That is correct. Wasn't a big deal though, so I threw together a patch for it and submitted it upstream.

Did some more testing on Windows and turns out that it wasn't that it retrieved the email and not the common name, but that Windows tried email, common name, organization name, and then organization, while Wine just gave up after email, which this chain doesn't have.

In any event, tested it and pleased to report that with this fixed it then goes on to load LibOVRRT32_1.dll. I couldn't see how to use the Wine DLL overloading to choose one native DLL over another (it only seems to have the option of choosing between builtin and native), but I did find a 32 DLL injector.

So I gave that a go with a patched wine

$ WINEDEBUG=+wintrust,+loaddll,+file,+crypt wine 'C:\Condor2\dll_injector32.exe' /dll 'C:\Condor2\LibRevive32.dll' /target 'C:\Condor2\Condor.exe'
...
[*] Debug privilege set!
DLL: C:\Condor2\LibRevive32.dll
PID: 292
Selected Action: LOAD
Injection OK!
...

and it works. Well, it works up to the point were Revive starts to initialize OpenVR and it tries to open C:\users\tyson\AppData\Local\openvr\openvrpaths.vrpath. I don't actually have OpenVR installed under the wine I built, so it then fails and Condor logs the message

ovr_Initialize failed with error: Installation path could not be located (110).

So what I need now is a patched wine with OpenVR (or OpenXR) support. I think the only wine with OpenVR or OpenXR is Steam's Proton though, and I don't have any experience building it. The best hope might be to see if I can get this patch included in a Proton Glourious Eggroll release as that would be faster than waiting for Wine to merge it and then Valve to rebase Proton on top of a Wine with the patch.

The other approach I that might work would be to take the Proton OpenXR DLL code and put it in standard Wine it see if it would build Wine with a OpenXR DLL for Revive to use.

@CrossVR
Copy link
Member

CrossVR commented Mar 15, 2023

Could also try a pull request against Valve's wine fork: https://github.com/ValveSoftware/wine/pulls

@twhitehead
Copy link

Just a note that all the proton corrections (the crypto and the submit pose) are now in proton bleeding edge.

This means they should be in the next proton bleeding edge beta and then eventually the next major proton stable.

I would expect there is a good change they will be in the next Proton GE release as well.

@Etaash-mathamsetty
Copy link

Just a note that all the proton corrections (the crypto and the submit pose) are now in proton bleeding edge.

This means they should be in the next proton bleeding edge beta and then eventually the next major proton stable.

I would expect there is a good change they will be in the next Proton GE release as well.

GE pulls directly from the BE tree so there's a great chance it will be in the next proton-ge. Thanks for your contributions :)

@Crashdummyy
Copy link

Did someone manage to get AsgardsWrath running ?
It looks okayish but immediately exits with fatal error.

image

I just copied the Directory from my old windows PC where I installed it using the oculus store those days.

@BoofOof32
Copy link

So I've discovered a while back that most Rift exclusives are a lost cause on Linux without a way of getting the Oculus launcher working, as there's no way of satisfying the entitlement checks (DRM) without it.

EchoVR is an interesting case though. So following twhitehead's guide. If you attempt to try this with EchoVR, it will usually give you the failed OVR runtime error. But when launching the game, there is about a 15% chance it will fullscreen, and error out for a different reason
Screenshot_20240928_002432

Looking at one of the crashlogs, it may have something to do with the pnsovr dll
RAD_CRASHDUMP_steamuser_echovr_28_00_05_26.log

@Etaash-mathamsetty
Copy link

So I've discovered a while back that most Rift exclusives are a lost cause on Linux without a way of getting the Oculus launcher working, as there's no way of satisfying the entitlement checks (DRM) without it.

EchoVR is an interesting case though. So following twhitehead's guide. If you attempt to try this with EchoVR, it will usually give you the failed OVR runtime error. But when launching the game, there is about a 15% chance it will fullscreen, and error out for a different reason
Screenshot_20240928_002432

Looking at one of the crashlogs, it may have something to do with the pnsovr dll
RAD_CRASHDUMP_steamuser_echovr_28_00_05_26.log

That log is practically useless, do you have a proton log ?

@BoofOof32
Copy link

I went ahead and reran with PROTON_LOG=1
steam-17721247793059725312.log

@Etaash-mathamsetty
Copy link

Unfortunate, I don't think I can debug this without having the exe itself

@BoofOof32
Copy link

EchoVR was originally obtainable for free via the Oculus launcher. Nowadays you'll have to get it via a community installer since the game is dead in an official capacity

@BoofOof32
Copy link

so how would I go about debugging EchoVR if I may ask?

@BoofOof32
Copy link

decided to lower the target for now, and try the built-in demos on the Oculus launcher.

I'm happy to report that I managed to get the Oculus Touch tutorial and First Contact to run https://youtu.be/CoMWTjUb8FA?si=l9HVPKuczXwlKgLn

What's curious though is that a lot of the inputs don't register, like button presses and or finger detection from capacitive sensors, so I can only make this gesture
image

@twhitehead
Copy link

@BoofOof32 nice going! Glad to see you successfully running some things! 🎉

@BoofOof32
Copy link

I have a hunch that my troubles with EchoVR are due to VKD3D since it's a D3D12 game. I've heard that D3D12 VR games in general were problematic on Proton until fairly recently (like May of this year). The only problem is I'm having trouble trying to patch the latest bleeding-edge with the necessary patches to get Revive going (The Oculus Touch Demo did not work on the latest GE or bleeding edge, it required the patched proton from last year)

@BoofOof32
Copy link

Okay, so a few days back, I gathered a few patches from CrossVR's Proton fork, and from twhitehead's wine-valve input branch
0001-winebus.sys-Only-apply-hidraw-disable-hacks-to-hidra.txt
0001-vrclient_main-Add-support-for-Submit_TextureWithPose.txt
0002-Update-vrclient_main.c.txt

So on the bleeding-edge branch of upstream Proton (ValveSoftware/Proton@cb52083), the first problem is some files have been rearanged in the time these commits were made

[daniel@ImaEndeavor Proton]$ git apply 0001-vrclient_main-Add-support-for-Submit_TextureWithPose.patch
error: vrclient_x64/vrclient_x64/vrclient_main.c: No such file or directory
[daniel@ImaEndeavor Proton]$ git apply 0001-winebus.sys-Only-apply-hidraw-disable-hacks-to-hidra.patch
error: dlls/winebus.sys/bus_udev.c: No such file or directory

if I edit the patch files to redirect to the new location of the source file, the patch just ends up failing :/

[daniel@ImaEndeavor Proton]$ git apply 0001-vrclient_main-Add-support-for-Submit_TextureWithPose.patch
error: patch failed: vrclient_x64/vrclient_main.c:894
error: vrclient_x64/vrclient_main.c: patch does not apply

So I'm sorta stumped on how I would apply these patches (besides maybe manually editing the files)

@BoofOof32
Copy link

Found my problem https://github.com/ValveSoftware/Proton/blob/proton_9.0/vrclient_x64/vrclient_main.c

vrclient_main.c is dramatically smaller compared to how it was in Proton 8, like 1000+ lines smaller

no wonder the patch didn't go through 😅

@twhitehead
Copy link

twhitehead commented Oct 25, 2024

There was a pretty heavy rewrite of the Wine VR stuff to bring in into line with wine's newer cleaner split between the Windows and the UNIX side. This came out of, if I understand correctly, the desire to be able to run 32 bit Windows binaries with Wine using 64 bit Linux libraries.

I did a rewrite for it, and rbernon (from CodeWeavers) and gofman guided we through getting it acceptable for upstream. It landed in Proton bleeding edge experimental on December 5, 2023. I checked a few of the changed files against the link you provided and they look like they are in agreement with the changes. Also looks like my commits are on that branch, so you should be good without any patching on this branch (proton_9.0) or later.

@BoofOof32
Copy link

I will be sure to report my findings with Proton 9.0. I've only tested recent GE releases and bleeding edge, which while the Oculus Tuscany demo world works, the Oculus Touch demo doesn't. 9.0-3 should be a good candidate as the changelog included Added support for D3D12 in OpenXR.

Should the touch demo still not work, something regressed, and I'll have to bisect

@twhitehead
Copy link

Have been busy and haven't ran steam for many months, so updated it and gave my sample apps a try. Results were mixed. Both the OculusWorldDemo and the DX11 OculusRoomTiny example worked under Proton 9.0-3.

Condor 2, however, does not. A popup says there was a failure to initialize the DirectX system. To dig into this a bit, I created the ~/.local/share/Steam/steamapps/common/Proton 9.0 (Beta)/user_settings.py file (from the sample one) and edited it to turn on "WINEDEBUG" (with "+vr_client") and "DXVK_LOG_LEVEL" : "debug". I didn't see anything DX or OpenVR related between when you click the start button and when the error is reported though. I also (eventually) recalled Condor 2 also creates a log file. In this it logs

ovr_Initialize failed with error: ovr_Initialize never called.

after you click start. All of this makes me wonder if something is now failing between Revive and the newer Proton 9.0.

@BoofOof32
Copy link

Yeah, Proton 9.0-3 didn't work out for the touch demo
image

@BoofOof32
Copy link

After a late night of bisecting, with ValveSoftware/Proton@ae89737 being the starting good commit, this was my end result
Screenshot_20241028_053008
There were a few commits it had me test that failed to compile that I marked as bad for that reason. But I feel it threw off my result, so I'm not convinced this is our culprit.

Currently ValveSoftware/Proton@c8669fbc is the most recent I've tested currently that works with the Oculus Touch demo. I'll keep testing for now

@BoofOof32
Copy link

okay, I've been going through the list of commits made to the bleeding-edge branch on Febuary 15th of this year

So ValveSoftware/Proton@c8669fbc is still the last commit that functioned properly with Revive. Any commit past ValveSoftware/Proton@d8f44fe5 (which is the one the bisect pointed me at) failed to build properly.

  -ffile-prefix-map=/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/src-wine=. \
  -mstackrealign -I/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-gst_orc32/include -I/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-gstreamer32/include -I/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-gst_base32/include -I/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-vkd3d32/include  -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse -fwrapv -fno-strict-aliasing -ffile-prefix-map=/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/src-wine=. -mstackrealign
../src-wine/dlls/winex11.drv/fs.c: In function 'fs_set_current_mode':
../src-wine/dlls/winex11.drv/fs.c:464:51: error: passing argument 2 of 'lstrcpyW' from incompatible pointer type [-Werror=incompatible-pointer-types]
  464 |     lstrcpyW( fs_monitor->user_mode.dmDeviceName, L"fshack" );
      |                                                   ^~~~~~~~~
      |                                                   |
      |                                                   const long int *
In file included from ../src-wine/dlls/winex11.drv/x11drv.h:64,
                 from ../src-wine/dlls/winex11.drv/fs.c:33:
../src-wine/include/winbase.h:2912:59: note: expected 'LPCWSTR' {aka 'const short unsigned int *'} but argument is of type 'const long int *'
 2912 | static inline LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
      |                                                   ~~~~~~~~^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:437460: dlls/winex11.drv/fs.o] Error 1
make[1]: *** Waiting for unfinished jobs....
    Finished release [optimized] target(s) in 43.69s
touch /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/.mediaconv-build32
mkdir -p /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib/gstreamer-1.0/
cp -a /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/obj-mediaconv32/i686-unknown-linux-gnu/release/libprotonmediaconverter.so /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib/gstreamer-1.0/
touch /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/.mediaconv-post-build32
:: installing 32bit mediaconv...
if [ -f "/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/obj-mediaconv32/compile_commands.json" ]; then mkdir -p "/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/compile_commands/mediaconv32/"; sed "s#/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/src-mediaconv#../../media-converter#g" "/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/obj-mediaconv32/compile_commands.json" > "/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/compile_commands/mediaconv32/compile_commands.json"; fi
mkdir -p /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib/ /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/
cd /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib && find -type f -printf '/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/%h\0' | sort -z | uniq -z | xargs --verbose -0 -r -P24 mkdir -p
mkdir -p /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/./gstreamer-1.0
cd /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib && find -type l -printf '%p\0/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/%p\0' | xargs --verbose -0 -r -P24 -n2 cp -a
cd /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' -printf '/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/%p.debug\0' | xargs --verbose -0 -r -P24 rm -f
rm -f /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/./gstreamer-1.0/libprotonmediaconverter.so.debug
cd /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dst-mediaconv32/lib && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' -printf '--strip-debug\0%p\0/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/%p\0' | xargs --verbose -0 -r -P24 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
objcopy '--file-alignment=4096' --set-section-flags '.text=contents,alloc,load,readonly,code' --strip-debug ./gstreamer-1.0/libprotonmediaconverter.so /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/dist/files/lib/./gstreamer-1.0/libprotonmediaconverter.so
touch /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/.mediaconv-dist32
In file included from ../src-wine/dlls/winevulkan/vulkan_thunks.c:20:
../src-wine/dlls/winevulkan/vulkan_thunks.c: In function 'copy_VkSubmitInfo':
../src-wine/dlls/winevulkan/vulkan_private.h:507:80: error: invalid application of 'sizeof' to a void type [-Werror=pointer-arith]
  507 | #define MEMDUP(ctx, dst, src, count) dst = conversion_context_alloc(ctx, sizeof(*dst) * count); \
      |                                                                                ^
../src-wine/dlls/winevulkan/vulkan_thunks.c:29730:13: note: in expansion of macro 'MEMDUP'
29730 |             MEMDUP(ctx, out_ext->pTag, in_ext->pTag, in_ext->tagSize);
      |             ^~~~~~
../src-wine/dlls/winevulkan/vulkan_private.h:508:36: error: invalid application of 'sizeof' to a void type [-Werror=pointer-arith]
  508 |     memcpy((void *)dst, src, sizeof(*dst) * count);
      |                                    ^
../src-wine/dlls/winevulkan/vulkan_thunks.c:29730:13: note: in expansion of macro 'MEMDUP'
29730 |             MEMDUP(ctx, out_ext->pTag, in_ext->pTag, in_ext->tagSize);
      |             ^~~~~~
../src-wine/dlls/winevulkan/vulkan_thunks.c: In function 'copy_VkSubmitInfo2':
../src-wine/dlls/winevulkan/vulkan_private.h:507:80: error: invalid application of 'sizeof' to a void type [-Werror=pointer-arith]
  507 | #define MEMDUP(ctx, dst, src, count) dst = conversion_context_alloc(ctx, sizeof(*dst) * count); \
      |                                                                                ^
../src-wine/dlls/winevulkan/vulkan_thunks.c:30070:13: note: in expansion of macro 'MEMDUP'
30070 |             MEMDUP(ctx, out_ext->pTag, in_ext->pTag, in_ext->tagSize);
      |             ^~~~~~
../src-wine/dlls/winevulkan/vulkan_private.h:508:36: error: invalid application of 'sizeof' to a void type [-Werror=pointer-arith]
  508 |     memcpy((void *)dst, src, sizeof(*dst) * count);
      |                                    ^
../src-wine/dlls/winevulkan/vulkan_thunks.c:30070:13: note: in expansion of macro 'MEMDUP'
30070 |             MEMDUP(ctx, out_ext->pTag, in_ext->pTag, in_ext->tagSize);
      |             ^~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:436780: dlls/winevulkan/vulkan_thunks.o] Error 1
make[1]: Leaving directory '/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/obj-wine32'
make: *** [../../Makefile.in:413: /home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026/.wine-build32] Error 2
make: *** Waiting for unfinished jobs....
WARNING: Dropping glyph names, they do not fit in 'post' table.
WARNING: Dropping glyph names, they do not fit in 'post' table.
rm obj-fonts/source-han/simsun.ttc.tmp
rm obj-fonts/LiberationMono-Bold.sfd obj-fonts/LiberationMono-Regular.sfd obj-fonts/LiberationSerif-Regular.sfd obj-fonts/LiberationSans-Bold.sfd obj-fonts/LiberationSans-Regular.sfd
make[1]: *** [../../Makefile.in:1158: all] Error 2
make[1]: Leaving directory '/home/daniel/repos/Proton/mainline/Proton/build/build-5dcd6026'
make: *** [Makefile:133: install] Error 2

ValveSoftware/Proton@b911e63 fixed the compilation errors by updating the wine submodule, but it's also the one where Revive compatibility breaks again

@twhitehead
Copy link

@BoofOof32 thanks very much for doing that! ValveSoftware/Proton@d8f44fe5 just adds --enable-werror to WINE_CONFIGURE_ARGS. I am thinking we should try and build and test the intermediate commits with this commit reverted.

@BoofOof32
Copy link

with ValveSoftware/Proton@d8f44fe5 reverted, I was able to get up to ValveSoftware/Proton@9e60111 to work with Revive.

Interestingly though, anything past that commit, testing ValveSoftware/Proton@ff94f04 and ValveSoftware/Proton@8f03470 lead to both Oculus World Demo and the TouchNUX demo to just sit in the background and not do anything. Not even the usual "Cannot run this application without an Oculus Rift" error
Screenshot_20241029_025424

@twhitehead
Copy link

twhitehead commented Oct 29, 2024

@BoofOof32 Wow! Nice work. I only had time to test the first bisect in the middle of your range last night, but observed the same behaviour of the process just hanging.

Condor 2 does give a bit more feedback though as the main menus don't use Direct X, the flight setup uses Direct X but not Oculus, and the actual flight uses Direct X and Oculus. This hanging is occuring on the flight setup. So it is indeed entirely different than the Oculus error, which only occurs once you start the flight.

My thought is we should create a new branch starting at ValveSoftware/Proton@b911e63 and then interactively rebase it back to ValveSoftware/Proton@d8f44fe5 in order to re-arranging the ValveSoftware/Proton@9e60111 to ValveSoftware/Proton@b911e63 range that you have identified.

We can move commits that we suspect are okay down to apply first on the last working commit ValveSoftware/Proton@9e60111 that you identified to verify that they are actually okay. We can also move commits that break compilation up to match the ones that fix their breakage (e.g., the warning to error one ValveSoftware/Proton@d8f44fe5 should probably go up to the very top to be right after the wine update commit).

My guess would be it is either one of the OpenVR related commits or one of the submodule updates. The strategy then would be to separate these out. I would apply all the proton: and lstreamclient: commits immediately on top
of ValveSoftware/Proton@9e60111 in order to test and eliminate them as they don't seem likely to be the issue. After those I would try the non-wine update commits that bump the submodule version. I expect most of these will be benign, but maybe this will identify it as a change that occured in wine or one of the DX modules (in which case we can move to bisecting the submodule).

If all of this succeeds, then we are left with just the vrclient* commits to test. If it turns out there are all sorts of inter-dependencies that make this not work, we could instead try moving all the vrclient* commits down to apply first and hopefully be able to test them.

@twhitehead
Copy link

twhitehead commented Oct 29, 2024

Here would be the actual rebase.

All the stuff that you just finished identifying as okay minus the wine-warnings-to-error commit which goes with the wine update

pick b9040886 proton: Add hidevggpu option and enable it for Serious Sam 4.
pick 0f45b246 proton: Add forcenvapi
pick 46c2f720 proton: Enable forcenvapi for Tony Hawk's Pro Skater 1 + 2
pick b86aa755 lsteamclient: Use getenv() in load_steamclient().
pick 6858265b proton: Enable WINE_HEAP_DELAY_FREE for WITCH ON THE HOLY NIGHT.
pick 37dc6df5 lsteamclient: Avoid accessing entry->callback.size after free.
pick 77c53456 vrclient: Respect provided struct sizes when returning structures.
pick 3784d63a vrclient: Remove unnecessary struct_needs_size_adjustment.
pick 29e9357b vrclient: Fix incorrect sized int type for VRInputValueHandle_t.
pick f2fa9ed3 Revert "lsteamclient: Use getenv() in load_steamclient()."
pick 5d374bdc lsteamclient: Use GetEnvironmentVariableW() in load_steamclient().
pick 2781aa3d proton: Add ir50_32.dll to dll copy list.
pick 53eee316 default_pfx: Set DLL search path.

I wasn't 100% certain if you meant up to and including this commit, in which case it should go here, or up to and not including it, in which case it should go down with the rest of the vrclient* commits

pick 9e601114 vrclient: Fail initialization if winevulkan unwrappers cannot be loaded.

followed by all the stuff that seems likely to be benign

pick 051cb009 lsteamclient: Fix g_tmppath buffer length.
pick 1eb87998 proton: Use server sync for Disaster Report 4: Summer Memories.
pick 22672c5b lsteamclient: Clear last error in create_win_interface().
pick faf681cd lsteamclient: Execute any pending callback before ReleaseRequest.
pick 49b1120e proton: Copy more VC runtime redists.
pick 5f9603eb proton: Enable gamedrive compat option for Bayonetta.
pick 457407ff lsteamclient: Copy the m_hSteamUser member in callback_message_utow.
pick 24d52723 proton: Disable nvapi for THE FINALS
pick 121cdab5 lsteamclient: Copy the ServerResponded parameter for delayed callbacks.
pick 9982db74 proton: Enable the new SDL 2.30 Steam Input integration.
pick 44c58e08 proton: Add Iragon: Prologue (2229490) to MFDXGI manager hack.
pick 500d6608 proton: Added Iragon: Prologue 18+ (1522260) to MFDXGI hack
pick 809b6b66 proton: Remove PROTON_DUMP_DEBUG_COMMANDS.
pick 1d044971 docs: Add DEBUGGING.md.

followed by the submodule updates and the wine-warning-to-error commit

pick 06480c61 update dxvk to v2.3-47-ge2a46a34
pick e7244cf4 update vkd3d-proton to v2.11.1-49-g32ff676b
pick 5dcd6026 update dxvk-nvapi to v0.6.4-48-g0951afb
pick b911e631 update wine
pick d8f44fe5 build: Enable -Werror for wine.

followed by the vrclient* updates

pick ff94f04e steam_helper, vrclient, openxr: Use Unix ABI for winevulkan unwrappers.
pick 250242f6 vrclient: Return STATUS_SUCCESS from vrclient_init() on initialization failures.
pick 8f034705 vrclient_x64: Unload native vrclient shared library on process detach.

@BoofOof32
Copy link

I went ahead and created a Proton fork with a branch starting on ValveSoftware/Proton@b911e63. https://github.com/BoofOof32/Proton/tree/Revive
I'm still figuring out how I would rebase the branch to ValveSoftware/Proton@d8f44fe5, since it's based on a newer commit. So would rebasing just revert all the commits made after ValveSoftware/Proton@d8f44fe5, then I'd start bringing back in the newer commits?

It has been a while since I've managed a git repository, and I didn't get all that complex with it, so apologies if I get confused in some areas.

@twhitehead
Copy link

I used up and down in my original note as if commits went latest to oldest. git rebase shows them in the order they are be applied, so that is oldest to latest, making my up and down comments backwards to the way you have to organize them. In any event, here are the commands

git checkout -b rebased b911e631b15f530eedcf45b5b7f91ccccacd258e
git rebase -i d8f44fe58ef49881a65732ab9f29ad474c474322

The first creates and checks out a branch called rebased starting ValveSoftware/Proton@b911e63. The second lets you modify all the commits starting at ValveSoftware/Proton@d8f44fe up to the checked out commit ValveSoftware/Proton@b911e63.

Basically the interactive rebase is like a series of patches to apply. You can specify if you want to edit any of them, change the commit message, etc., and also just change the order. So reorder them as node above, save the file, and quit. Git will then go back to ValveSoftware/Proton@d8f44fe and apply them in the order specified from top to bottom. The commit hashes will change as the history will now be different, but hopefully it will bisect better (more of it will build) than the original in order to identify which one actually broke it.

@twhitehead
Copy link

Tried a few orders. Seems the two critical commits are

steam_helper, vrclient, openxr: Use Unix ABI for winevulkan unwrappers.

and

update wine

Either by itself gives the DX hanging on flight setup. Both together give the initialization error on flight start.

I guess the next thing to do is bisect the update wine (that is, bisect the wine submodule between the before update and after update commits) to see when the freezing happened and if it can be separated from the initialization failure.

@BoofOof32
Copy link

Sorry for the hiatus, I got busy with some other things and needed a break.

I tried rebasing ValveSoftware/Proton@b911e63 to ValveSoftware/Proton@d8f44fe with this order

pick 8f034705 vrclient_x64: Unload native vrclient shared library on process detach.
pick 250242f6 vrclient: Return STATUS_SUCCESS from vrclient_init() on initialization failures.
pick ff94f04e steam_helper, vrclient, openxr: Use Unix ABI for winevulkan unwrappers.
pick d8f44fe5 build: Enable -Werror for wine.
pick b911e631 update wine
pick 5dcd6026 update dxvk-nvapi to v0.6.4-48-g0951afb
pick e7244cf4 update vkd3d-proton to v2.11.1-49-g32ff676b
pick 06480c61 update dxvk to v2.3-47-ge2a46a34
pick 1d044971 docs: Add DEBUGGING.md.
pick 809b6b66 proton: Remove PROTON_DUMP_DEBUG_COMMANDS.
pick 500d6608 proton: Added Iragon: Prologue 18+ (1522260) to MFDXGI hack
pick 44c58e08 proton: Add Iragon: Prologue (2229490) to MFDXGI manager hack.
pick 9982db74 proton: Enable the new SDL 2.30 Steam Input integration.
pick 121cdab5 lsteamclient: Copy the ServerResponded parameter for delayed callbacks.
pick 24d52723 proton: Disable nvapi for THE FINALS
pick 457407ff lsteamclient: Copy the m_hSteamUser member in callback_message_utow.
pick 5f9603eb proton: Enable gamedrive compat option for Bayonetta.
pick 49b1120e proton: Copy more VC runtime redists.
pick faf681cd lsteamclient: Execute any pending callback before ReleaseRequest.
pick 22672c5b lsteamclient: Clear last error in create_win_interface().
pick 1eb87998 proton: Use server sync for Disaster Report 4: Summer Memories.
pick 051cb009 lsteamclient: Fix g_tmppath buffer length.
pick 9e601114 vrclient: Fail initialization if winevulkan unwrappers cannot be loaded.
pick 53eee316 default_pfx: Set DLL search path.
pick 2781aa3d proton: Add ir50_32.dll to dll copy list.
pick 5d374bdc lsteamclient: Use GetEnvironmentVariableW() in load_steamclient().
pick f2fa9ed3 Revert "lsteamclient: Use getenv() in load_steamclient()."
pick 29e9357b vrclient: Fix incorrect sized int type for VRInputValueHandle_t.
pick 3784d63a vrclient: Remove unnecessary struct_needs_size_adjustment.
pick 77c53456 vrclient: Respect provided struct sizes when returning structures.
pick 37dc6df5 lsteamclient: Avoid accessing entry->callback.size after free.
pick 6858265b proton: Enable WINE_HEAP_DELAY_FREE for WITCH ON THE HOLY NIGHT.
pick b86aa755 lsteamclient: Use getenv() in load_steamclient().
pick 46c2f720 proton: Enable forcenvapi for Tony Hawk's Pro Skater 1 + 2
pick 0f45b246 proton: Add forcenvapi
pick b9040886 proton: Add hidevggpu option and enable it for Serious Sam 4.

it seems to have tripped over on applying the 2nd commit

Auto-merging vrclient_x64/unixlib.cpp
CONFLICT (content): Merge conflict in vrclient_x64/unixlib.cpp
error: could not apply 250242f6... vrclient: Return STATUS_SUCCESS from vrclient_init() on initialization failures.
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Could not apply 250242f6... vrclient: Return STATUS_SUCCESS from vrclient_init() on initialization failures.

perhaps I applied in the wrong order? I did flip the order of picks you listed for the rebase

@twhitehead
Copy link

Yeah. Pretty sure you can't flip the order as some of later ones likely do build on the earlier ones.

Note too that when you go to bisect wine, you will want to apply this patch that causes it to always download the vulkan xml file. Without this it will stop building when you go back to before this file was added

--- a/Makefile.in
+++ b/Makefile.in
@@ -414,7 +414,8 @@ $(eval $(call rules-autoconf,wine,64))
 $(OBJ)/.wine-post-source:
        -cd $(WINE_SRC) && tools/make_specfiles
        cd $(WINE_SRC) && tools/make_requests
-       cd $(WINE_SRC) && dlls/winevulkan/make_vulkan -x vk.xml
+#      cd $(WINE_SRC) && dlls/winevulkan/make_vulkan -x vk.xml
+       cd $(WINE_SRC) && dlls/winevulkan/make_vulkan
        touch $@
 
 $(OBJ)/.wine-post-build64:

There are also a lot of intermediate commits that don't build. I found it best to just leave it running on a loop until it succeeds

while rm -fr build && mkdir build && cd build && ../configure.sh --enable-ccache && ! make install; do
  cd ../wine && git bisect skip && cd .. || break
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

12 participants