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

Age of Empires II: Definitive Edition (813780) #3189

Open
2 tasks done
ThaChillera opened this issue Nov 4, 2019 · 649 comments
Open
2 tasks done

Age of Empires II: Definitive Edition (813780) #3189

ThaChillera opened this issue Nov 4, 2019 · 649 comments
Labels
Game compatibility - Unofficial Games not expected to work without issues Regression Confirmed working on an older version of Proton XAudio2 Uses the XAudio2 subsystem

Comments

@ThaChillera
Copy link

Compatibility Report

  • Name of the game with compatibility issues: Age of Empires II: Definitive Edition
  • Steam AppID of the game: 813780

System Information

  • GPU: GTX 680
  • Driver/LLVM version: nvidia 435.21
  • Kernel version: 5.3.8-arch1-1
  • Link to full system information report as Gist:
  • Proton version: 4.11-7

I confirm:

  • that I haven't found an existing compatibility report for this game.
  • that I have checked whether there are updates for my system available.

Proton Log

Symptoms

When it starts, I get a splash screen and a popup: Title: "Wine C++ Runtime Library". Text: "A Program: Z F Press OK to exit program, or Cancel to start the Wine debugger."

Reproduction

Just boot the game normally

@kisak-valve kisak-valve added the Game compatibility - Unofficial Games not expected to work without issues label Nov 4, 2019
@aeikum
Copy link
Collaborator

aeikum commented Nov 4, 2019

Possibly due to missing SpVoice object. From your log:

2901.866:0039:003a:err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x17
2909.925:0039:003a:trace:seh:NtRaiseException code=80000003 flags=0 addr=0x7bcaf638 ip=7bcaf639 tid=003a

@ThaChillera
Copy link
Author

How can I solve this?

@aeikum
Copy link
Collaborator

aeikum commented Nov 4, 2019

If you want to get into Wine development, implement the SpVoice class and whatever interfaces the app requests (probably ISpeechVoice, possibly more) in dlls/sapi, and see if that is enough to get the game running or if it needs more work past that.

@Marroja
Copy link

Marroja commented Nov 9, 2019

I have tried installing several versions of VC Runtime, both using Winetricks and with normal prefix installation and none of them worked. I also tried using DotNet but I haven't got past that same error you're telling us @ThaChillera

I tried installing SpVoice dll with winetricks today but still nothing. @aeikum I tried sweeping all the error's on Chillera's log and on mine but still nothing.

In case it helps in any way:

https://gist.github.com/Marroja/2c9b6a118c7d6b19359839b92a3fd7c3

@Marroja
Copy link

Marroja commented Nov 9, 2019

At the moment I understand the main problem is regarding an unwinding problem. I'm not sure how to deal with it.

@ozyman42
Copy link

Seeing this issue on a new install of the officially released game.

@Mte90
Copy link

Mte90 commented Nov 15, 2019

I think that the problem is related also to #2995 so probably in this other ticket there are info to fix this one.

@krisives
Copy link

AFAIK this is actually a problem related to sapi.dll not existing?

@busyboredom
Copy link

As a workaround, how hard would it be to kill the speech recognition functionality? I don't think sapi would be needed for anything other than speech recognition, right?

@nawaik
Copy link

nawaik commented Nov 15, 2019

Has anyone tried this yet?

https://www.reddit.com/r/aoe2/comments/dwuplr/how_to_run_age_of_empires_2_definitive_edition_on/

@Mte90
Copy link

Mte90 commented Nov 16, 2019

I am trying this but with the last proton (waiting to download the game).
Anyway this tutorial suggest to use DXVK 1.4.4 or newer and Proton 4.11-8 (https://github.com/ValveSoftware/Proton/releases/tag/proton-4.11-8) already include them.

So the big difference with proton is wine staging that they are at wine 4.20 (https://dl.winehq.org/wine/source/4.x/) and to execute the 2 commands of the tutorial to set win10 and reinstall vcrun2017.

So my doubt are more about proton that is using an old version of wine compared to this tutorial.

@mozo78
Copy link

mozo78 commented Nov 16, 2019

Following the instructions from reddit:
https://i.imgur.com/zdleeea.png
Using Wine-Staging 4.20.

@Mte90
Copy link

Mte90 commented Nov 16, 2019

I installed the game in steam with proton 4.11-8 and get the already known error.
Using the reddit thread (after that installation in steam with all the dependence) I am trying with executing protontricks 813780 win10 vcrun2017.
This didn't worked :-(

@Mte90
Copy link

Mte90 commented Nov 16, 2019

After protontricks 813780 speechsdk vcrun2017 win10 I am getting the same error but now the library sapi.dll is avalaible, I am trying to understand if it isn't registered.

"/home/myuser/.steam/steam/steamapps/common/Proton 4.11/dist/bin/wine" regsvr32 sapi.dll
Says that is registered rightly.

@Mte90
Copy link

Mte90 commented Nov 16, 2019

Last insights about sapi.dll I don't think that is the problem because is a common issue in wine and everything worked (I searched on mailing lists and so on). So I think that is a fake positive, looking at my debug:

10919.688:002f:0030:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
10919.689:002f:0030:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
10919.689:002f:0030:err:ole:create_server class {96749377-3391-11d2-9ee3-00c04f797396} not registered
10919.690:002f:0030:fixme:ole:CoGetClassObject CLSCTX_REMOTE_SERVER not supported
10919.690:002f:0030:err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x17
10956.011:002f:0030:trace:seh:MSVCRT_raise (22)
Setting breakpad minidump AppID = 813780
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198055726040 [API loaded no]
10957.051:0016:001a:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\drivers\\winebus.sys" : builtin
10957.051:0016:001a:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\setupapi.dll" : builtin
pid 64012 != 64011, skipping destruction (fork without exec?)

The real error is at MSVCRT_raise but doesn't include any hints about the error. I am not an expert of wine/proton but I finished all my ideas.

@Mte90
Copy link

Mte90 commented Nov 16, 2019

Uhm I said to quickly, enabling D9VK (PROTON_USE_D9VK=1) I got an error finally:

11342.603:002f:0030:trace:seh:MSVCRT_raise (22)
Unable to read VR Path Registry from C:\users\steamuser\Local Settings\Application Data\openvr\openvrpaths.vrpath
Setting breakpad minidump AppID = 813780
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198055726040 [API loaded no]
11343.640:0016:001a:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\drivers\\winebus.sys" : builtin
11343.640:0016:001a:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\setupapi.dll" : builtin
pid 64461 != 64460, skipping destruction (fork without exec?)

@GSchuemann
Copy link

Hello there, I am the creator of the tutorial and looking at your and mine output I discovered something which might be helpful for you.
I also get this part:
010d:fixme:ntdll:EtwEventRegister ({4372afee-73b0-42ce-9821-7e134361b519}, 0x13f006fd0, 0x13f0595c0, 0x13f0595b8) stub. 010d:fixme:nls:get_dummy_preferred_ui_language (0x8 0x22e1cc 0x22e630 0x22e1c8) returning a dummy value (current locale) 010d:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:err:ole:create_server class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:fixme:ole:CoGetClassObject CLSCTX_REMOTE_SERVER not supported 010d:err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x17

The error Message where you can click on ignore appears right now, when clicked on ignore it goes on like this:
0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000019-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_BeginList 0x5c3a678 (0x993fbcc {92ca9dcd-5622-4bba-a805-5e9f541bd8c9} 0x993fbd8): stub ...

So with wine-staging 4.19 I don't get the MSVCRT_raise error. In mozo78s output (wine-staging 4.20) this error is also missing there just isn't an ignore option for him (for some reason).

DXVK is needed to display buildings and units otherwise they are invisible it shouldn't have to do with this bug.

@mozo78
Copy link

mozo78 commented Nov 16, 2019

Here's the log with Wine-Staging 4.19:
https://pastebin.com/DWdmJtZh

@kubapet
Copy link

kubapet commented Nov 16, 2019

Hello there, I am the creator of the tutorial and looking at your and mine output I discovered something which might be helpful for you.
I also get this part:
010d:fixme:ntdll:EtwEventRegister ({4372afee-73b0-42ce-9821-7e134361b519}, 0x13f006fd0, 0x13f0595c0, 0x13f0595b8) stub. 010d:fixme:nls:get_dummy_preferred_ui_language (0x8 0x22e1cc 0x22e630 0x22e1c8) returning a dummy value (current locale) 010d:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:err:ole:create_server class {96749377-3391-11d2-9ee3-00c04f797396} not registered 010d:fixme:ole:CoGetClassObject CLSCTX_REMOTE_SERVER not supported 010d:err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x17

The error Message where you can click on ignore appears right now, when clicked on ignore it goes on like this:
0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_QueryInterface not implemented for {00000019-0000-0000-c000-000000000046} (unknown) 0142:fixme:shell:CustomDestinationList_BeginList 0x5c3a678 (0x993fbcc {92ca9dcd-5622-4bba-a805-5e9f541bd8c9} 0x993fbd8): stub ...

So with wine-staging 4.19 I don't get the MSVCRT_raise error. In mozo78s output (wine-staging 4.20) this error is also missing there just isn't an ignore option for him (for some reason).

DXVK is needed to display buildings and units otherwise they are invisible it shouldn't have to do with this bug.

Have you tried to run
winetricks -q vcrun2015
When using wine 4.19 staging?

@mozo78
Copy link

mozo78 commented Nov 16, 2019

Yes I did. It doesn't change nothing :(
Here's the log with vcrun2015 and Wine-Staging 4.19:
https://pastebin.com/Xk04auTH

@kubapet
Copy link

kubapet commented Nov 16, 2019

I was actually asking Georg, but nevermind,
I GOT IT WORKING on pure wine 4.19 staging installation, I even though I got the "message where you can click ignore" (the same one as you reported you got on 4.20 https://i.imgur.com/zdleeea.png.. but as georg said on 4.19 staging you can click on ignore for some reason)..

@GSchuemann
Copy link

Great that it also worked on pure (wanted to test this in the next few days, but other people aren't as lazy as me ;))

The missing buildings are fixed with DXVK.

Interesting that the ignore button is missing in 4.20

@kubapet
Copy link

kubapet commented Nov 16, 2019

:) So where did you manage to run it before? or how did you know that DXVK is needed for buildings and units?

@GSchuemann
Copy link

:) So where did you manage to run it before? or how did you know that DXVK is needed for buildings and units?

I saw the game needed DirectX11 (looked at Systemrequirements) and I knew that it isn't yet fully implemented in wine, so I tried DXVK, which just worked.

I reinstalled vcrun, because I thought that a reinstalled vcrun would help. I hadn't the idea to click on ignore before I did that so I was unsure if it really runs on pure.

Have you also changed the Windowsversion or does it also run with "Windows 7" ?

@kubapet
Copy link

kubapet commented Nov 16, 2019

:) So where did you manage to run it before? or how did you know that DXVK is needed for buildings and units?

I saw the game needed DirectX11 (looked at Systemrequirements) and I knew that it isn't yet fully implemented in wine, so I tried DXVK, which just worked.

I reinstalled vcrun, because I thought that a reinstalled vcrun would help. I hadn't the idea to click on ignore before I did that so I was unsure if it really runs on pure.

Have you also changed the Windowsversion or does it also run with "Windows 7" ?

I am not sure we mean the same thing by "pure" .. I still ment the staging version, just not proton.. And yes, it runs with Windows 7 as well.. But now I have installed the DXVK and it doesn't run anymore.. The game just doesn't pop up, only cursor changes and then nothing is rendered and mouse is not moving (looks like the screen is controllerd by the app but nothing is rendered) and I can get out of it only after I press alt+tab .. I am probably still missing some DX dependencies ?

EDIT: OK, now it runs, and buildings and units are rendered properly.. I just wasn't patient enough :)

@EnriqueWood
Copy link

Has anybody tried online functionality?

@mozo78
Copy link

mozo78 commented Nov 16, 2019

I was actually asking Georg, but nevermind,
I GOT IT WORKING on pure wine 4.19 staging installation, I even though I got the "message where you can click ignore" (the same one as you reported you got on 4.20 https://i.imgur.com/zdleeea.png.. but as georg said on 4.19 staging you can click on ignore for some reason)..

What do you mean by pure? Without vcrun2017? It doesn't run both with or without vcrun 2017 installed and I have no "Ignore" button with Wine-Staging 4.19...

@GSchuemann
Copy link

GSchuemann commented Nov 16, 2019

Has anybody tried online functionality?

Spectating works flawlessly.

Haven't tried out a real match yet, but I am expecting it to work.

We mean by pure that no changes were made to the prefix.

Maybe the missing button is distribution related, I use ubuntu 19.10, which one do you use?

@sulix
Copy link

sulix commented Nov 16, 2019

The reason people aren't getting the "Ignore" button on the assertion error is that when vcrun2017 is being installed, for some reason ucrtbase.dll isn't being installed properly.

Copying over a 64-bit ucrtbase.dll to c:\windows\system32 is sufficient to get the "Ignore" button to work, after which the game works fine in Proton.

Ideally, of course, either wine would support the SpApi speech API stuff properly, or the game would handle it not loading better, but this works for now.

@0Xellos
Copy link

0Xellos commented Dec 23, 2023

@procobain I don't have this problem, but once in a rare while, alt-tab causes my game to switch resolution to maximum and/or keep the bottom desktop panel permanently visible and blocking the bottom of the game even on fullscreen. On previous laptops (arch+xfce and ubuntu+gnome/cinnamon, now I'm on arch+cinnamon) I also had the ancient bug where game gets stuck always scrolling to a corner after alt-tab. My solution? Rebind alt+tab to ctrl+alt+tab so that I wouldn't mash it by accident so easily 🤣

@Xinayder
Copy link

Xinayder commented Jan 8, 2024

I just installed the game and had an out of sync issue playing multiplayer. It was fixed by using protontricks and installing ucrtbase2019:

protontricks 813780 ucrtbase2019 -q

@procobain
Copy link

I'm having some freezes after finishing a game and returning to the ranked screen, when I click on "Find Match", the colors become slightly darker and the game freezes, I have to force it to close. Somebody else?

I use Arch Linux with xfce and Proton GE always on the latest version, currently 8.30.

@ranplayer
Copy link

I've found a regression for Proton 9.0 (Beta 11). The intro videos are not displayed (there is only sound):

steam-813780.tar.gz

Specs

  • OS: Arch
  • Kernel: 6.6.18
  • GPU: RX 6700 XT (Mesa 24.0.1)
  • CPU: Ryzen 7 5700G

@sulix
Copy link

sulix commented Feb 25, 2024

I can also reproduce the missing intro videos on Proton 9.0, on different hardware.

There are a few suspicious messages in the logs:

winegstreamer error: decodebin0: Your GStreamer installation is missing a plug-in.
winegstreamer error: decodebin0: ../src-gst_base/gst/playback/gstdecodebin2.c(4704): gst_decode_bin_expose (): /GstBin:bin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: Advanced Streaming Format (ASF) (video/x-ms-asf)


(wine:5935): GStreamer-Video-CRITICAL **: 21:19:25.013: gst_video_info_from_caps: assertion 'gst_caps_is_fixed (caps)' failed

(wine:5935): GStreamer-Audio-CRITICAL **: 21:19:25.024: gst_audio_info_from_caps: assertion 'gst_caps_is_fixed (caps)' failed

620139.391:0120:0124:fixme:dxva2:device_manager_processor_service_GetVideoProcessorDeviceGuids 00000000611B5EC8, 000000000011D3F0, 000000000011D39C, 000000000011D3B0 semi-stub.
620139.391:0120:0124:fixme:dxva2:device_manager_processor_service_GetVideoProcessorDeviceGuids 00000000611B5EC8, 000000000011D3E0, 000000000011D38C, 000000000011D3A0 semi-stub.
620139.391:0120:0124:fixme:dxva2:device_manager_processor_service_GetVideoProcessorDeviceGuids 00000000611B5EC8, 000000000011D470, 000000000011D41C, 000000000011D430 semi-stub.
620139.391:0120:02b8:warn:threadname:NtSetInformationThread Thread renamed to L"audio_client_timer"
620139.393:0120:02bc:warn:threadname:NtSetInformationThread Thread renamed to L"wine_dsound_mixer"
620139.404:0120:0124:fixme:dxva2:device_manager_processor_service_CreateVideoProcessor 00000000611B5EC8, {5a54a0c9-c7ec-4bd9-8ede-f3c75dc4393b}, 000000000011D330, 22, 15, 0000000061098978.
620139.405:0120:0124:fixme:dxva2:device_manager_processor_service_CreateVideoProcessor 00000000611B5EC8, {5a54a0c9-c7ec-4bd9-8ede-f3c75dc4393b}, 000000000011DC20, 22, 15, 0000000061098978.
620139.406:0120:0124:fixme:evr:filter_media_event_sink_Notify iface 000000003D233F18, event 32, param1 0, param2 0.
620139.407:0120:0124:fixme:wmvcore:WMReaderAdvanced2_SetOutputSetting reader 000000005168C0F0, output_num 0, name L"DedicatedDeliveryThread", type 3, value 000000000011DC3C, length 4 semi-stub!
620139.407:0120:0124:fixme:wmvcore:WMReaderAdvanced2_SetOutputSetting reader 000000005168C0F0, output_num 1, name L"DedicatedDeliveryThread", type 3, value 000000000011DC3C, length 4 semi-stub!

But most particularly, a lot of spam of:

fixme:evr:evr_render Unhandled input type {3231564e-0000-0010-8000-00aa00389b71}.

That looks to be the result of wine's EVR implementation not supporting the NV12 format. Wine recently added support for YUY2, which is similar, though that's not been backported into Proton. If the rest of the stack supports it, something similar for NV12 should be possible.

@fragiledish4432

This comment was marked as resolved.

@Arkanosis

This comment was marked as resolved.

@fragiledish4432

This comment was marked as resolved.

@Arkanosis

This comment was marked as resolved.

@fragiledish4432

This comment was marked as resolved.

@Arkanosis

This comment was marked as resolved.

@sulix
Copy link

sulix commented Feb 25, 2024

This patch seems to fix the missing intro video in Proton 9.0 for me:

Date: Sun, 25 Feb 2024 23:47:53 +0800
Subject: [PATCH] evr/dshow: List NV12 as supported, improve warnings

Add support for NV12 to evr_render(), as otherwise no video is rendered
at all in games like Age of Empires II DE.

Interestingly, this doesn't result in NV12 data being passed to
evr_copy_sample_buffer() as I suspected, so the RGB32 copying code seems
to work fine. Nevertheless, add a warning if we get an unknown format in
evr_copy_sample_buffer(), as that could potentially lead to nasty memory
issues.

Signed-off-by: David Gow <david@ingeniumdigital.com>
---
 dlls/evr/evr.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c
index 516427c5fff..3871b710d45 100644
--- a/dlls/evr/evr.c
+++ b/dlls/evr/evr.c
@@ -368,9 +368,14 @@ static HRESULT evr_copy_sample_buffer(struct evr *filter, const GUID *subtype, I
     {
         width = (3 * width + 3) & ~3;
     }
+    else if (IsEqualGUID(subtype, &MFVideoFormat_ARGB32)
+                || IsEqualGUID(subtype, &MFVideoFormat_RGB32))
+    {
+        width *= 4; 
+    }
     else
     {
-        width *= 4;
+        FIXME("unsupported video format %s\n", debugstr_guid(subtype));
     }
 
     if (FAILED(hr = IMediaSample_GetPointer(input_sample, &src)))
@@ -427,7 +432,8 @@ static HRESULT evr_render(struct strmbase_renderer *iface, IMediaSample *input_s
 
     if (IsEqualGUID(&subtype, &MFVideoFormat_ARGB32)
             || IsEqualGUID(&subtype, &MFVideoFormat_RGB32)
-            || IsEqualGUID(&subtype, &MFVideoFormat_YUY2))
+            || IsEqualGUID(&subtype, &MFVideoFormat_YUY2)
+            || IsEqualGUID(&subtype, &MFVideoFormat_NV12))
     {
         if (SUCCEEDED(hr = evr_copy_sample_buffer(filter, &subtype, input_sample, &sample)))
         {
-- 
2.43.2

It's based on top of the YUY2 patch upstream, though, to be honest, I suspect it'd work with just the one || IsEqualGUID(&subtype, &MFVideoFormat_NV12) line on top of Proton 9.0.

I'm still not 100% sure why this works — I spent quite a while trying to work out where the conversion from NV12 → RGB32 was happening, and calculating the right sizes and strides, but it all seems to work behind the scenes somewhere.

@kisak-valve
Copy link
Member

Hello @sulix, this looks like something to be sent upstream first. Can you make a pull request upstream?

@fragiledish4432

This comment was marked as resolved.

@Arkanosis

This comment was marked as resolved.

@fragiledish4432

This comment was marked as resolved.

@norg
Copy link

norg commented Mar 10, 2024

@RokeJulianLockhart I just ran into the same issue that you had and might have found one potential root cause. Do you also have any internal GPU enabled?

I had the issue that it runs flawlessly with all Proton versions on my Thinkpad with AMD Ryzen and AMD GPU but starting with Proton 6 the performance on my Desktop system with Ryzen 7950X3D and AMD Radeon 7900 XT was near a frozen screen. I couldn't find any diff between the two systems, same kernel, driver version etc. So the slower GPU had no issues but the big 7900 XT had, but only on AoE2 (Other games run perfect with Proton Experimental) and Proton after 6, since Proton 5.13 was also fine.

Maybe you can try this as well (I know it has been some time), so we could report this to the developers, that this could be a potential issue.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Mar 10, 2024

#3189 (comment)

@norg, I'm also using solely AMD hardware — a 12-thread Ryzen 5 7600X 6-Core CPU and Radeon RX 5700, but on a self-built desktop system, rather than a laptop. I'm not sure that my ASRock X670E Taichi MB even allows its iGPU to operate simultaneously, but I'll try to verify that it's disabled.

Do you have Resizable BAR enabled? Considering we're both using AMD stuff, could you verify whether your Thinkpad has that enabled? It might be worth checking, since NVIDIA & Intel systems won't be able to use that.

I also recall Ao2DE working on an older Proton version, so thanks for verifying that I'm not going insane — that it is v6.

Many thanks. I'll corroborate any report you file.

@azerazer44
Copy link

Game does not launch. I click to Play, then it turns into Launching, and then it turns into Stop and that's all. Then it is again in the beginning, Play.

I am using Ubuntu 20.04, I have Nvidia RTX 2080. I am using nvidia driver-535 proprietary, tested. I installed Wine, WineTricks, PlayonLinux.

I tried all Proton's 7.0, 8.0, 9.0, Experimental. I tried all betas from Experimental. The result is the same.

However, I should mention something weird. A few months ago I figured out to play the game in such a strange way.

When I was trying to launch the game, nothings were happening. Then I was installing Wine by using Ubuntu Software, then it started to work. The next day or when I restart the computer, it did not start again, and then I just uninstall the Wine which was installed before. And surprisingly the game worked again.

I was able to play the game for a long time with this trick. But then something did happen or I mess with somethings. Now this does not work anymore.

Can you guys please help me? I am desperately looking forward to play this game

@Arkanosis
Copy link

I installed Wine, WineTricks, PlayonLinux.
I tried all Proton's 7.0, 8.0, 9.0, Experimental. I tried all betas from Experimental.

You shouldn't have to try all of this to get the game to work on Ubuntu 20.04 + RTX 2080: Steam + latest stable version of Proton should be enough. Proton 7.0 does not work with AoE2:DE version 87863 (June 2023) or higher.

With all the attempts you've described, you might now have a version of Proton which is different from what is shipped with Steam. I'd suggest you uninstall both Proton 9 and AoE2:DE, then reinstall AoE2:DE (Proton 9 should be reinstalled automatically — just make sure you've not forced the usage of an older version of Proton).

If you have (or have had) multiple GPUs, check this troubleshooting section to make sure the game is not using the wrong GPU or driver (a better approach has been suggested, if you want to try it as well).

@procobain
Copy link

procobain commented Aug 15, 2024

Tip 1:

Solving a problem in XFCE4 that causes the ALT+Mouse1 shortcut to stop working:
After switching between windows with Alt+Tab in the middle of the game, the Alt+Mouse1 shortcut stops working, because XFWM4 thinks you are still changing the window, and this is also its shortcut.

Just go to xfce4-settings-editor, xfwm4, and clear the easy_click value.
2024-08-15_08-34

Tip 2:

Better functioning of the AOE2DE window:
(keep the game in fullscreen and borderless, but you can do other things too)

Install the "gamescope" composer, and use it in the startup options:
gamescope -W 1920 -H 1080 -f -b -- %command%
(enter the value of your resolution)

Gamescope is a very good tool for games on Linux, learn about it and you'll like it, hugs.

@luskaner
Copy link

luskaner commented Aug 22, 2024

@Arkanosis @sulix

I have investigated further the issue of the Battle Server and these are my conclusions:

  • SO_BROADCAST: This option is not set to true by default and the newer info I could get online is that it was required in Win10 to be set when using a broadcast IP... however, this is no longer the case with Win11 as the option has no effect and seems to work regardless of what you set in that option which indicates windows is just using the IP to know if it's a broadcast address (similar to other OSes).
  • connect being called before setting SO_BROADCAST to true: While this is not the usual way, this is totally correct in windows as, let me quote, "For a connectionless socket (for example, type SOCK_DGRAM), the operation performed by connect is merely to establish a default destination address that can be used on subsequent send/ WSASend and recv/ WSARecv calls" (Source: https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect). Meaning it is not actually doing any connection at all, until the eventual send method is called, thus setting options before that is totally allowed too. This is confirmed by the fact that, if you were to use sendto method instead, no connect call is needed at all.
  • There are no address reusing at all regarding the UDP port to broadcast to 9999

As you can see wine needs some fixes for this two interrelated issues (I've tested with latest wine development branch 9.15 and stills happens).

BTW this is the code I used in Visual Studio 2022 mimicking the reverse engineered Battle server calls in order to test:

#include <iostream>
#include <winsock2.h>
#include <ws2tcpip.h>

#pragma comment(lib, "ws2_32.lib")

int main() {
    WSADATA wsa;
    SOCKET s;
    struct sockaddr_in server {};

    if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) {
        std::cerr << "WSAStartup error. Error Code: " << WSAGetLastError() << std::endl;
        return 1;
    }

    if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {
        std::cerr << "Socket error. Error Code: " << WSAGetLastError() << std::endl;
        WSACleanup();
        return 1;
    }

    memset((char*)&server, 0, sizeof(server));
    server.sin_family = AF_INET;
    if (inet_pton(AF_INET, "255.255.255.255", &server.sin_addr) <= 0) {
        std::cerr << "inet_pton error. Error Code: " << WSAGetLastError() << std::endl;
        closesocket(s);
        WSACleanup();
        return 1;
    }
    server.sin_port = htons(9999);

    if (connect(s, (struct sockaddr*)&server, sizeof(server)) < 0) {
        std::cerr << "Connect error. Error Code: " << WSAGetLastError() << std::endl;
        closesocket(s);
        WSACleanup();
        return 1;
    }

    BOOL broadcast = TRUE;
    if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char*)&broadcast, sizeof(broadcast)) < 0) {
        std::cerr << "Cannot configure socket for broadcast. Error Code: " << WSAGetLastError() << std::endl;
        closesocket(s);
        WSACleanup();
        return 1;
    }

    const char* message = "\x21\x24\x00\x35\x34\x36\x66\x35\x30\x66\x61\x2d\x33\x63\x63\x31"
        "\x2d\x34\x32\x64\x33\x2d\x38\x37\x64\x35\x2d\x36\x39\x64\x66\x36"
        "\x65\x35\x61\x61\x33\x65\x65\x09\x00\x4d\x79\x20\x53\x65\x72\x76"
        "\x65\x72\x84\x69\x00\x00\x4c\x6a";
    int messageLen = 56;

    int bytesSent = send(s, message, messageLen, 0);
    if (bytesSent == SOCKET_ERROR) {
        std::cerr << "Send error. Error Code: " << WSAGetLastError() << std::endl;
        closesocket(s);
        WSACleanup();
        return 1;
    }

    closesocket(s);
    WSACleanup();

    return 0;
}

If you simply moved the connect after setting the broadcast option, then it works perfectly in wine.

@gofman
Copy link

gofman commented Aug 22, 2024

the issue of the Battle Server

@luskaner Thanks for substantial analysis and the test case!

I didn't check anything with the game (in fact don't know how to repro the issue, some instructions on that would be helpful for testing), but I confirmed that the difference between Windows and Wine behaviour illustrated by the test exists and did a bit of more unit testing around that.

The just updated Proton Experimental ([bleeding-edge] branch, available to select in Proton Experimenal tool properties, Beta tab), experimental-bleeding-edge-9.0-113941-20240822-p95282c-w94c64a-dd89e32-vc97ec3, has the tentative fix for that (I also sent it Wine upstream: https://gitlab.winehq.org/wine/wine/-/merge_requests/6335/). That should be fixing the test case, wonder if it also fixes the issue with the game?

@luskaner
Copy link

@gofman

No problem :) so how it works is the game itself (AoE2DE_s.exe) spawns the BattleServer\BattleServer.exe executable, but you can execute it yourself as it is standalone in a sense and check if it works or not. The current issue was that it was crashing once connect was being called (as it returned an error), to verify this part works the best is to use Wireshark and listen for UDP broadcasts (255.255.255.255) packets to 9999 port (should happen once every 10 seconds) - as maybe after this is solved other issues arises and crashes nonetheless. I will try to to check your wine code tomorrow, you were fast :D

@gofman
Copy link

gofman commented Aug 22, 2024 via email

@luskaner
Copy link

@gofman Ah got it, start the game, go to multiplayer and try to make a new lobby, in the server dropdown the server "Use Local Lan Server" must appear (before it did not appear) as the game now should be able to 'discover' the BattleServer =)

@gofman
Copy link

gofman commented Aug 22, 2024 via email

@sulix
Copy link

sulix commented Aug 22, 2024

@luskaner @gofman

Thanks! I've applied the patch and done some quick tests, and this explanation and patch do seem to fix the BattleServer connection here, for both Age of Empires 1 and 2 DE.

It also doesn't seem to have the disconnection issue we had with the earlier patch, though that may be due to a separate wine/game update which fixes the encryption issues.

I haven't managed to actually play a game over the LAN yet, but that's just due to only having one copy of the game: I ran a "LAN game" with only one player (which is possible in AoE2 DE, but not the first game), and it ran fine for quite a while, with encouraging network activity in wireshark.

I commented on the upstream patch as well.

@luskaner
Copy link

@sulix If you don't have multiple PC's and licenses the easiest way is probably testing with someone (ask me if you want =) over the internet using a VPN and testing it works the 3 combinations:

  • 2 on linux.
  • 1 on linux + Windows on Steam.
  • 1 on linux + Windows on Microsoft Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game compatibility - Unofficial Games not expected to work without issues Regression Confirmed working on an older version of Proton XAudio2 Uses the XAudio2 subsystem
Projects
None yet
Development

No branches or pull requests