ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.41k stars 1.02k forks source link

Age of Empires: Definitive Edition (1017900) #2995

Open gcavalcante8808 opened 4 years ago

gcavalcante8808 commented 4 years ago

Compatibility Report

System Information

I confirm:

====================== Proton: 1561645030 proton-4.2-9 SteamGameId: 1017900

Errors (I cant paste here because of the "Comment is too long (maximum is 65536 characters) Error": https://gist.github.com/gcavalcante8808/46146866096ba70d56a9607cc1a7c77e

Symptoms

The gamejust Crahes and wont open.

Reproduction

Install and try to run the game.

Krutonium commented 4 years ago

info: Game: AoEDE_s.exe info: DXVK: v1.3.2-4-g0b21ef18 warn: OpenVR: Failed to initialize OpenVR info: Required Vulkan extension VK_KHR_get_physical_device_properties2 not supported info: Required Vulkan extension VK_KHR_surface not supported info: Required Vulkan extension VK_KHR_win32_surface not supported err: DxvkInstance: Failed to create instance

jzengc commented 4 years ago

I can reproduce a crash related to media foundation here: wine: Call from 0x7bc6ab1c to unimplemented function MFPlat.DLL.MFCreateDXGIDeviceManager, aborting

I will have a try to add some stub implementations of these to see if it help.

LinkofHyrule89 commented 4 years ago

I'm trying to fun this in Debian in Crostini and it's telling me that it couldn't initialize Direct X 11 is there anything extra I need to set up to get it to recognize DX11 with Proton? It never gets past there and just closes.

kisak-valve commented 4 years ago

Hello @Krutonium, @LinkofHyrule89, Proton uses DXVK to translate DirectX 11 to Vulkan, it failing to initialize usually indicates that your system does not have a working Vulkan driver installed or your hardware does not support Vulkan. You can use any simple Vulkan application like vulkaninfo as a test.

Alternatively, you could try adding PROTON_USE_WINED3D=1 %command% to the game's launch options to tell Proton to use the DirectX 11 to OpenGL render path, but you'll still hit the Media Foundation issue.

Krutonium commented 4 years ago

Welp, I completely forgot to install the Vulkan libs on my system. Thanks for the pointer!

ryao commented 4 years ago

At a minimum, not only does making this work require implementing MFCreateDXGIDeviceManager(), but we also need to implement at least part of IMFDXGIDeviceManager:

https://docs.microsoft.com/en-us/windows/win32/api/mfobjects/nn-mfobjects-imfdxgidevicemanager https://docs.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mfcreatedxgidevicemanager

ryao commented 4 years ago

This is failing to play the intro video and I am told in IRC that the NoStartup commandline switch from the original game does not work. If someone can find a way to disable the intro videos, then it should be possible to workaround this.

ryao commented 4 years ago

The workaround from here might make it work:

https://github.com/ValveSoftware/Proton/issues/1102#issuecomment-419678627

However, that person appears to be transplanting the entire Windows Media Foundation component from a working Windows install into Proton. A more lightweight workaround (or patches that make it work) would be desirable.

LinkofHyrule89 commented 4 years ago

Just as an update to my own commend. I discovered that Crostini doesn't currently support Vulkan in Virgl GPU Acceleration. So I submitted a bug report on their side so hopefully, this can be corrected in the future so that Vulkan works correctly on Linux apps for Chromebooks. Good luck getting the rest of the issues sorted out so AOEDE can hopefully run on Linux in the future thanks for your hard work :)

telans commented 4 years ago

The workaround from here might make it work:

#1102 (comment)

However, that person appears to be transplanting the entire Windows Media Foundation component from a working Windows install into Proton. A more lightweight workaround (or patches that make it work) would be desirable.

I've tried transplanting dlls, but that doesn't seem to work. Just to note I haven't tried doing anything else in that comment which is why I probably didn't get anywhere. But anyway:

First I got Unimplemented function MFPlat.DLL.MFCreateDXGIDeviceManager, so I took the Windows 10 dll. Then unimplemented function RTWorkQ.DLL.RtwqRegisterPlatformEvents. One RTWorkQ.dll later, and unimplemented function KERNEL32.dll.SetProcessPreferredUILanguages. I haven't got any further than this

ryao commented 4 years ago

@telans You need to use the Windows 7 versions and set certain registry entries. There is a special version of winetricks that does this:

https://github.com/Winetricks/winetricks/issues/1132#issuecomment-460552268

telans commented 4 years ago

@telans You need to use the Windows 7 versions and set certain registry entries. There is a special version of winetricks that does this:

Winetricks/winetricks#1132 (comment)

I've used that version and installed mf @ Win7, but the game still requires RTWorkQ.dll, so I had to manuall put that in.

However, now I actually get to the splash screen (AoE poster), and I also now get a fullscreen black window with the DXVK hud. Screenshots:

Screenshot_20190824_095046 Screenshot_20190824_094330

aoe-log.log

ryao commented 4 years ago

@telans Please post your proton log.

telans commented 4 years ago

@telans Please post your proton log.

https://gist.githubusercontent.com/telans/6c87b989bd9b4bf921b68415263271bd/raw/c5ffe0670de24efdf3749405576671e9a66e84eb/AoE-DE.log

ryao commented 4 years ago

There are quite a few messages about the d3dcompiler, which would explain the black screen. Try using proton tricks to install d3dcompiler_43. That might not be the right version. If it is not, the other options would be d3dcompiler_42 and d3dcompiler_47.

telans commented 4 years ago

Unfortunately none of them have helped.

What I find weird is that wine throws wine: Unhandled exception 0x40000015 in thread 37 at address 0x140253f96 (thread 0037), starting debugger... & err:seh:setup_exception stack overflow 288 bytes in thread 003c eip 000000007bcae49f esp 00000000001314f0 stack 0x130000-0x131000-0x230000 before DXVK even initializes.

ryao commented 4 years ago

@telans Those are bad too. However, the stack overflow is in BattleServer.exe. That appears to be related to networking, so it should not be vital for rendering. The stack overflow is likely from BattleServer.exe too. At least, there is no process with thread id 003c printed in the list prior to it.

The later: Unhandled exception: page fault on write access to 0x0000003c in 64-bit code (0x000000000108e2d2). appears to be killing it. Also, upon closer look, it appears that this uses d3dcompiler_47, not d3dcompiler_43. The latter was just a guess on my part that I made as I was on my way to call it a night.

Would you post an updated proton log from your prefix from the run with the various d3dcompilers installed?

ryao commented 4 years ago

@telans Upon closer inspection, it looks like my guess last night picked the wrong component. The NULL pointer dereference is occuring in InputSystem_w32.dll, which a quick web search indicates is shipped with the game. This could be related to the BattleServer.exe crash (e.g. the DLL expecting to talk to BattleServer.exe and not having it around), although I really don't understand what either component is supposed to do. I cannot find much documentation on them aside from their names.

Also, I am not sure what binary contains the code where the stack overflow is occurring. I don't see code being mapped into a region that contains 000000007bcae49f.

Unfortunately, there do not seem to be any hints about what to do next in the proton log. :/

sulix commented 4 years ago

Okay, so the InputSystem_w32.dll problem seems to be due to the game needing the Win32 Text Services Framework. Unfortunately, using winetricks' msctf.dll installation isn't enough to stop it crashing.

Fortunately, the game does start correctly if the code that calls into InputSystem_w32.dll's TextServicesFrameworkManager_get() function is patched out (in particular, the calls to the object returned by that function need to be patched out, rather than the calls themselves). In the 28529 update, this involves NOPping out (replacing with 0x90) 7 bytes at 0x13672e and 0x1f4675. With those changes, and the other MFPlay/RTWorkQ changes mentioned above, the game does start, and can get in-game (though from the 5 minutes testing I've done, it does seem to crash a bit).

[Edit: Also nopping out 7 bytes at 0xcadde is sufficient to fix the crashes. The game now works pretty well, except for keyboard input, which doesn't work at all (no hotkeys, no text input — so saving doesn't work). Otherwise, the game works pretty well.]

telans commented 4 years ago

Does the keyboard work before changing 0xcadde?

sulix commented 4 years ago

Alas, no: without the change at 0xcadde, pressing any key will crash the game.

Apart from the keyboard, though, the game is pretty stable and playable. I haven't had a chance to test multiplayer, yet, but it looks promising: the XBLA account stuff doesn't seem to work, but otherwise the Steam-based lobby seems to.

[Edit: Hotkeys work with nopping out two bytes at 0xCADE7. This doesn't fix text input, so still no saving.]

Saxtr0 commented 4 years ago

is there any howto to apply these workarounds?

telans commented 4 years ago

Use a hex editor or some related tool on the game's exe

Saxtr0 commented 4 years ago

sorry for asking, it was so obvious, that this edit include the winetricks and everythink else mentioned in here .....

Jabraco commented 4 years ago

With all the hype with aoe2DE, this game seems to have been forgotten. I have a few questions about running this:

  1. Is nopping out the bytes sufficient to get this game running? Or do I also have to apply the fix mentioned here to get things running? I have tried only nopping out the bytes to no avail, but I could be doing something wrong.

  2. Has anyone tried the workarounds mentioned in the aoe2DE issue to get this game running? To my knowledge the games are running on a similar if not updated engine.

  3. A more general question, what would be required either on Wine or Proton's end to get this game working with keyboard input without the aforementioned hex editor edits on the game's exe?

sulix commented 4 years ago

To the best of my knowledge:

  1. No, you do also need to get a new enough mf and RTWorkQ.dll as that post (and the one beneath it) mention.
  2. The games are different enough that the problems don't really overlap: AoE2DE's issues are largely with the Speech Synthesis feature (which doesn't exist in AoE1DE), whereas the issues in this game are mostly to do with text input APIs, and a multithreaded graphics context feature, neither of which are used in AoE2DE. (This actually is likely why AoE2DE still has the "stuck scrolling" bug, but AoE1DE doesn't — AoE2DE doesn't have the newer keyboard code which fixed that issue, but requires this nopping to work under wine.)
  3. To avoid the nopping, wine would need to implement the Win32 Text Services Framework more completely — I haven't looked into exactly what is missing in detail, but it's almost certainly there. If wine also implements a few extra media framework features (e.g. MFPlat.DLL.MFCreateDXGIDeviceManager), that could remove the need to install the newer mf and RTWorkQ.dll.

Hope that helps, even if it's not all good news. Alas, AoE2DE seems to actually be quite different from this game in the parts wine has trouble with, so fixes for one are unlikely to help the other much.

Shatrico commented 4 years ago

Now with the newest Proton and Proton 4.15-GE-4 the game is starting ( I think Microsoft changed something) The game is running fine but there is no audio

montyubuntu commented 4 years ago

I can confirm that with Proton 4-11-12 the game is running fine except no audio. Some Windows users have reported the same issue that was fixed by reinstalling DirectX. Maybe there is a sound library missing? I'm running on the 5.4.13-3-MANJARO kernel.

zskamljic commented 4 years ago

I can confirm it's working for me as well, although there seems to be no audio and first startup takes forever. I have also tried the z0z0z patch mentioned on protondb, however that causes the game to crash almost instantly (before getting to the menu). My kernel is 5.4.13-arch1-1.

thiagozanetti commented 4 years ago

Same for Ubuntu 19.04 (working fine, no audio) Linux version 5.0.0-40-generic (buildd@lgw01-amd64-020) (gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)) #44-Ubuntu SMP Wed Jan 15 02:03:45 UTC 2020

rlka commented 4 years ago

Same for me, no sound. Linux rl-Home 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

linux4life1 commented 4 years ago

I got audio to work! the initial fix applys to getting audio to work on windows 8.1 but I can confirm on centos kernel 4.18.0-168 with latest proton audio does work.

https://steamcommunity.com/app/1017900/discussions/0/2763442118824570475/

montyubuntu commented 4 years ago

I got audio to work! the initial fix applys to getting audio to work on windows 8.1 but I can confirm on centos kernel 4.18.0-168 with latest proton audio does work.

https://steamcommunity.com/app/1017900/discussions/0/2763442118824570475/

The xaudio2_8.dll and xaudio2_9.dll are placeholder dll's. I have replaced them with dll's I found on wikidll but that doesn't work for me. Can you do a checksum (md5sum) of the dll file so I can compare this with mine? md5sum: 5137262f1d43c11f20c4dd47fb6f0c7d

linux4life1 commented 4 years ago

md5sum 2b9a8ba991348e45b8a01245c8eda3da

your not suposed to download any new .dll rather rename the ones already in your pfx folder

-Go to Windows/System32 -Copy XAudio2_8.dll (Default for Windows 8.1) -Paste it in the same directory -Change the copy name to XAudio2_9.dll

if you want I can make a copy and email or dropbox it to you?

kisak-valve commented 4 years ago

Hello @linux4life1, please do not redistribute game files. Other players who have the game should have equal access.

yaliv commented 4 years ago

md5sum 2b9a8ba991348e45b8a01245c8eda3da

your not suposed to download any new .dll rather rename the ones already in your pfx folder

-Go to Windows/System32 -Copy XAudio2_8.dll (Default for Windows 8.1) -Paste it in the same directory -Change the copy name to XAudio2_9.dll

if you want I can make a copy and email or dropbox it to you?

I got this from Proton:

$ md5sum xaudio2*                                                           
717b3e5fc98d0d3b8dbda13ccedfe7d9  xaudio2_0.dll
f8d44b128d5913e63b206b3fc71a45e6  xaudio2_1.dll
8c1c2e1ab3d0d9984676f71453164e8c  xaudio2_2.dll
45586f69eafb87dcbd49aa8681584d10  xaudio2_3.dll
d52c14ce2d96fd4ae5e97f767ff1ae9d  xaudio2_4.dll
0a1a0d55ef1be1dfaa2a3f434961ebde  xaudio2_5.dll
b444773828ba05bae0d476a5e0924e5e  xaudio2_6.dll
b5141853435e6ae9a9109127f7ffbf90  xaudio2_7.dll
2b9a8ba991348e45b8a01245c8eda3da  xaudio2_8.dll
2b9a8ba991348e45b8a01245c8eda3da  xaudio2_9.dll

And I got this from Lutris-Wine:

$ md5sum xaudio2*                                                           
9134d28d5bb85714f1d2ea393debb38d  xaudio2_0.dll
e9c0f926d7c9082a805f4fef81deeb30  xaudio2_1.dll
9df5e8721cbba07e96b9dab4d8338bf9  xaudio2_2.dll
dab239cd4541d96c853c02872da10e46  xaudio2_3.dll
b6662b7a0f62ba457eaf72dc2e857acb  xaudio2_4.dll
be4f013454649d99555d0dc780fac7d9  xaudio2_5.dll
8a08a8f2ab92a0f14ac9f002d8125e10  xaudio2_6.dll
8264b8835ace2dec4ed5c7580b36ea22  xaudio2_7.dll
a5541841720a7dafafdf84597a58f0b9  xaudio2_8.dll
43bebae3cf4ac42fdd76dc1e384e94bc  xaudio2_9.dll

They're so different :man_shrugging:

montyubuntu commented 4 years ago

That md5sum (2b9a8ba991348e45b8a01245c8eda3da) matches with a bunch of placeholder dll's. Are you sure this is is the correct dll?

$ strings xaudio2_8.dll
Wine placeholder DLL
.text
`.reloc
B.rsrc
HKCR
    NoRemove Interface
    {
    }
    NoRemove CLSID
    {
    }
yaliv commented 4 years ago

That md5sum (2b9a8ba991348e45b8a01245c8eda3da) matches with a bunch of placeholder dll's. Are you sure this is is the correct dll?

$ strings xaudio2_8.dll
Wine placeholder DLL
.text
`.reloc
B.rsrc
HKCR
    NoRemove Interface
    {
    }
    NoRemove CLSID
    {
    }

Oh yes, actually, I didn't do anything besides md5sum. That's the original file I got when using Proton (v4.11-12).

It prints exactly the same as yours:

$ strings xaudio2_8.dll                                                     
Wine placeholder DLL
.text
`.reloc
B.rsrc
HKCR
    NoRemove Interface
    {
    }
    NoRemove CLSID
    {
    }
yaliv commented 4 years ago

I got this from Proton:

$ md5sum xaudio2*                                                           
717b3e5fc98d0d3b8dbda13ccedfe7d9  xaudio2_0.dll
f8d44b128d5913e63b206b3fc71a45e6  xaudio2_1.dll
8c1c2e1ab3d0d9984676f71453164e8c  xaudio2_2.dll
45586f69eafb87dcbd49aa8681584d10  xaudio2_3.dll
d52c14ce2d96fd4ae5e97f767ff1ae9d  xaudio2_4.dll
0a1a0d55ef1be1dfaa2a3f434961ebde  xaudio2_5.dll
b444773828ba05bae0d476a5e0924e5e  xaudio2_6.dll
b5141853435e6ae9a9109127f7ffbf90  xaudio2_7.dll
2b9a8ba991348e45b8a01245c8eda3da  xaudio2_8.dll
2b9a8ba991348e45b8a01245c8eda3da  xaudio2_9.dll

And as we can see there, both xaudio2_8.dll and xaudio2_9.dll have the same md5sum.

Note: I installed another game. I don't have Age of Empires: Definitive Edition yet.

zskamljic commented 4 years ago

I have managed to get the sound working by following the guide on ProtonDB (including renaming the videos). I am seeing another issue now, game seems to crash, usually when doing something mouse related (panning, scrolling)

Shatrico commented 4 years ago

<Link removed by moderator> With the new workarounds on protondb this installed and the video files renamed the Game is working fine with playing the music/voices/sounds fine

edit: @kisak-valve sry didnt know it

kisak-valve commented 4 years ago

Hello @Shatrico, the workaround you linked is legally problematic and has been removed.

gcavalcante8808 commented 4 years ago

Can we use the Xaudio2_9.dll redistributable provided by nuget galleries? https://www.nuget.org/packages/Microsoft.XAudio2.Redist/1.2.0#

vinifmor commented 4 years ago

The game is playable on Proton 5.0-1, but still no sound.

CSahajdacny commented 4 years ago

The game is playable on Proton 5.0-1, but still no sound.

Have you tried WINEDLLOVERRIDES="xaudio2_7=b,n" or WINEDLLOVERRIDES="xaudio2_7=n,b"

vinifmor commented 4 years ago

@CSahajdacny just tried here and still no sound.

montyubuntu commented 4 years ago

I got sound working with the latest proton (5.0.1) and the <Workaround removed by moderator>

Also, I have disabled the intro videos by moving the Video directory:

cd {steamlibrary}/steamapps/common/AoEDE/Assets
mv Video Video_disabled
kisak-valve commented 4 years ago

Hello @montyubuntu, the workaround you linked is legally problematic and has been removed.

mozo78 commented 4 years ago

With vanilla Wine it doesn't need MFplat and the sounds works out-of-the-box :)

zskamljic commented 4 years ago

Latest update seems to have fixed the crashes for me, now everything works as it should, with the exception of XBox live integration, so I can't invite friends from that list, but aside from that the game seems to be fully playable.