Cannot use AVX2 in Wine

 

Hello,

I am trying to setup a lab using Ubuntu + Wine, that consists in:

  • A single machine where I do the development of the EA
  • A few additional machines that act exclusively as remote agents

I was successful in getting the agent installed on the remote agents, and it does recognise AVX2, but I'm struggling to get the same success on the main machine.

Specifically, I have tried to use both the standard install method as well as another one via Bottles - which allows me to test different Wine runners. But, no matter what I choose, the MT5 setup will always install the X64 binary, not the AVX2 one. This, despite AVX2 being fully visible within the Wine environment, and I could test it successfully by running, in that same exact Wine environment, CPU-Z and even compiling a small C .exe file that I ran within the same exact Wine environment:

cpuid.1: avx=1 osxsave=1 fma=1
xcr0=000000000000001f
cpuid.7: avx2=1
PF[40]=1
GetEnabledXStateFeatures=000000000000001f

So I tried a bit of a hacky thing: on one of the remote agents, I have installed the full MT5 (build 5836), confirmed it was the AVX2 one, picked the .exe files and transferred them over to this machine.

It works, in that now I get:

2026.05.29 11:21:19.098 Terminal Windows 10 build 19045 on Wine 11.9 Linux 7.0.0-15-generic, 4 x Intel Core i5-7400  @ 3.00GHz, AVX2, 14 / 30 Gb memory, 57 / 245 Gb disk, GMT+1

But still, an EA compiled as AVX2 will not work:

2026.05.29 11:21:21.322 MQL5 your CPU architecture does not allow to run the file 'test1.ex5': AVX2 required, you have X64 only

This is a bit of a head-scratcher for me, because the terminal now sees AVX2, so why would it still give me such an error?

I suspect that perhaps the "hacky thing" of forcing the AVX2 .exe file onto the existing installation is not the best approach, but I don't know how to do otherwise. The setup is the only thing that does not "see" AVX2 for some reason, everything else does see AVX2. Maybe there is something else that I need to also copy over from the other installation on the remote agent? Or some setting that I need to change somewhere in some other .ini file, and it's still hardcoded to X64 somehow?

I'm avoiding using VMs like VirtualBox, because this would create more overhead and force me to limit the amount of available memory. I would really like Wine to work as an option, I'm sure there is a simple step I need to fix to get this sorted out for good.

Thanks in advance for any advice on this.

 
Please check if FMA feature is enabled in Wine.
 
Ilyas #:
Please check if FMA feature is enabled in Wine.

Thanks Ilyas, it is indeed present, you can see it from the output of the C test:

cpuid.1: avx=1 osxsave=1 fma=1