[UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO
-
@gundam said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
he VM not
Hi. The need of the GPU maybe is not true. From the DLL no3D post:
“A Direct3D11 wrapper to run Falcon BMS 4.35 without a video card.”So you dont need a video card. Thanks to this DLL.
-
I’m having zero luck with 4.37.1 on WINE.
Arch Linux, kernel 6.1.9, 6900XT with Mesa 22.3.4.
Thrustmaster T16000M, TCWS and Rudder pedals.
Native Linux sims like X-Plane, Steam sims like DCS, Tiny Combat Arena, Elite, etc. and even legacy sims like IL-2 1946 work perfectly with the HOTAS. Headtracking using my Opentrack fork with better WINE/Proton handling, fed from AITrack also works if set to the proper WINE runner and prefix.BMS, however…
Using system WINE (8.1.1) with a system prefix or one created with Bottles:
- BMS downloads, installs and updates just fine.
- The regular launcher works, the Alternate Launcher always freezes when assigning HOTAS axes. Not even using NET Framework 4.6+ (installed via Winetricks) instead of Mono helps.
- Manual axis assignments via User/Config/DeviceDefaults.txt works.
- All axes and controls work in the main menu.
- As soon as I enter 3D, only the TWCS works. The T16000M is dead despite being the first device and despite correct and working axis assignments in the UI.
If I switch the device order in User/Config/DeviceSorting.txt, the T16000M will work in 3D, but the TWCS will not. As soon as I ALT-TAB out and back in, BMS stops accepting any keyboard inputs except from the TWCS. Mouse look still works.
(Found @hoover’s old post about this and IIRC pressing ALT to reenable keyboard input does indeed work.)
Using a legacy WINE version like soda-7.0-9 (included in Bottles):
- Same as items 1 and 2 above
BMS does not even start, crashing with an error message.
Works after installing BMS with the DirectX option enabled!
(Can be installed separately after BMS from the redistributable as well.)
At this point, getting Opentrack to work is the smallest hurdle.
Sigh…
-
Hi!
I hope I can help with this.As for using the launcher, I think you need .net 4.8
I’m using wine 5.21. I made many tests and it’s the one that works best for me while also recognizing my devices. If I recall correctly, since wine version 6.something, installing .net versions is bugged so you might need to use it for installing libraries and then back to a higher version. I use Lutris, where changing wine version is very easy. Never used Bottles, so it might be easy there too.
About controllers, if you open windows control panel on that wineprefix check if all your devices are activated. You might also have the same device twice, as (js) and (event). event is more modern, so you should probably aim for them to work, but I found (js) ones work better for me, so I disabled the (event) ones.
As for the Alt-tabbing, as I just see you found about, ALT+ENTER and you will have the controls back.
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
As for using the launcher, I think you need .net 4.8
The alternate launcher actually only requires 4.6.2 if the terminal output is to be believed.
But installing NET 4.6.2 or 4.8 does not help at all as the UI will just freeze when trying to assign any axis.
I’m using wine 5.21. I made many tests and it’s the one that works best for me while also recognizing my devices. If I recall correctly, since wine version 6.something, installing .net versions is bugged so you might need to use it for installing libraries and then back to a higher version. I use Lutris, where changing wine version is very easy. Never used Bottles, so it might be easy there too.
I just tried launching BMS with WINE 5.21 from the Bottles prefix, but all I get is a crash.
About controllers, if you open windows control panel on that wineprefix check if all your devices are activated. You might also have the same device twice, as (js) and (event). event is more modern, so you should probably aim for them to work, but I found (js) ones work better for me, so I disabled the (event) ones.
As I’ve said, all devices and axis are working in WINE’s control panel and BMS’ 2D UI. Just not after entering 3D.
Maybe I should start from scratch with 5.21.
-
@ph34rb0t Just for completion, as I’m going to sleep now and I can’t help you until tomorrow, what I have installed in my prefix is:
d3dcompiler_43
dotnet40
dotnet45
dotnet46
dotnet48
msxml3corefonts
Wine is set to windows10 and emulate virtual desktop equal to my screen’s resolution.
As for the Lutris configuration I use Vulkan.
I have to add that I started this wineprefix on BMS4.34 so I don’t remember exactly why I have all this installed and/or if some are useful anymore. Some I believe are for Weapon Delivery Planner (maybe .Net48?).
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
But installing NET 4.6.2 or 4.8 does not help at all as the UI will just freeze when trying to assign any axis.
I think 4.6.1 sufficient… but it’s built with a dogs-breakfast of 12+ year old dependencies, like Microsoft.DirectX.Input.dll.
For that reason (I assume) it runs in 32-bit runtime process… even on x64 system. (I haven’t tested, I’m just guessing, there are some interop problems with the DirectInput wrappers on x64.)
Is .NET framework on WINE 64-bit only? I don’t know, but if so, that might explain why it’s crashing/hanging, especially at the moment it tries to begin collecting dx input.
I’d recommend to set aside the New Launcher… focus on getting BMS proper running and stable. Then maybe later, turn attention back to AL.
-
@airtex2019 wow… just, wow… almost 18 years.
so hard to believe that still works at all… MS at their best? or worst. I don’t know anymore…
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t Just for completion, as I’m going to sleep now and I can’t help you until tomorrow, what I have installed in my prefix is:
d3dcompiler_43
dotnet40
dotnet45
dotnet46
dotnet48
msxml3corefonts
Wine is set to windows10 and emulate virtual desktop equal to my screen’s resolution.
As for the Lutris configuration I use Vulkan.
I have to add that I started this wineprefix on BMS4.34 so I don’t remember exactly why I have all this installed and/or if some are useful anymore. Some I believe are for Weapon Delivery Planner (maybe .Net48?).
I’ve installed all DirectX related things and whatever else I imagined could be needed, but 4.37.1 simply refuses to start with WINE 5.21.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I think 4.6.1 sufficient… but it’s built with a dogs-breakfast of 12+ year old dependencies, like Microsoft.DirectX.Input.dll.
That explains a lot. Is this needed for backward compatibility?
For that reason (I assume) it runs in 32-bit runtime process… even on x64 system. (I haven’t tested, I’m just guessing, there are some interop problems with the DirectInput wrappers on x64.)
Is .NET framework on WINE 64-bit only? I don’t know, but if so, that might explain why it’s crashing/hanging, especially at the moment it tries to begin collecting dx input.
I assume that Dotnet is 64bit, but WINE throws lots of warnings during the installation recommending a 32bit install.
But mixing and matching 32bit and 64bit prefixes is not possible, so it’s either Dotnet or any 64bit app.
The entire situation is a trainwreck, but fortunately most, simpler, apps work fine with Mono (the AL not being one of them).The funny thing is that I remember the AL working at version 1.4 or 1.6. But this was long ago.
I’d recommend to set aside the New Launcher… focus on getting BMS proper running and stable. Then maybe later, turn attention back to AL.
The AL is the least of my worries. Not having a usable HOTAS in 3D is my biggest one.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@airtex2019 wow… just, wow… almost 18 years.
so hard to believe that still works at all… MS at their best? or worst. I don’t know anymore…
Hm. WINE offers very old native overrides for dinput. If BMS uses the same ancient DLL, then maybe this could improve matters.
-
BMS starts working from WINE 7.20 onward and does not require any DotnetFX to launch and operate. It could be that 5.xx is unable to interface with some newer system libraries like Pipewire.
I also found out that only the device selected in the controller options in the 2D UI is being used. If I set the dropdown menu to the T16000M, I can use the stick, but not the TWCS. If I select the TWCS, I get input from that one, but not the T16000M. If I set it to “keyboard”, neither the T16000M nor the TWCS works.
Oh man. -
@ph34rb0t is that a regression from 4.36 or earlier?
I’m not a BMS dev so I don’t know what I don’t know. But I haven’t heard of any recent changes in the dx input stack.
-
I’m out of ideas.
Only to be fully sure. As mentioned on the first post, you need wine64 to run BMS but you can install 32bit apps inside it if you prepare the system for that.sudo dpkg --add-architecture i386
Maybe you need to install .net 32bit version? I’m just wild guessing here.
Other than that, I’ve reached my knowledge limit. Let’s hope people with more knowledge can help you.
-
Sorry if this is a dumb question, but you’re saying that you can assign all the axes (even of the TWCS) in BMS 2d setup after selecting the “joystick” as your main input device in 2d?
That’s the way it should be, only ever use the “joystick” as your main BMS 2d setup input device.
Then, once you have assigned all the TWCS and TM axes, you enter 3d and only the joystick works in 3d?
Cheers, Uwe
-
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t is that a regression from 4.36 or earlier?
I’m not a BMS dev so I don’t know what I don’t know. But I haven’t heard of any recent changes in the dx input stack.
I don’t know. My last attempt with BMS in WINE was 4.35 and I gave up. Before that I think I managed to run 4.33 for some actual flying.
All I know for searching the forums is that the axis issue also seems to happen on Windows and the advertised solution appears to be using the AL and not touch BMS’ 2D controller setup menu or vjoy or TARGET to combine two devices into a single virtual one.
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I’m out of ideas.
Only to be fully sure. As mentioned on the first post, you need wine64 to run BMS but you can install 32bit apps inside it if you prepare the system for that.sudo dpkg --add-architecture i386
Maybe you need to install .net 32bit version? I’m just wild guessing here.
Other than that, I’ve reached my knowledge limit. Let’s hope people with more knowledge can help you.
32bit libraries are required to run Steam, so these are already installed.
Thanks anyway for the effort.
@hoover said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
Sorry if this is a dumb question, but you’re saying that you can assign all the axes (even of the TWCS) in BMS 2d setup after selecting the “joystick” as your main input device in 2d?
Yes, all axes on each device work in 2D.
That’s the way it should be, only ever use the “joystick” as your main BMS 2d setup input device.
That’s what I read in the forums as well. Select the joystick as primary device in the 2D UI and all other connected devices should work in 3D as well.
Then, once you have assigned all the TWCS and TM axes, you enter 3d and only the joystick works in 3d?
Yes.
I’ve already tried native overrides for dinput.dll and dinput8.dll (as required to make IL-2 1946 work, btw.), but this does not do the trick for BMS.
-
@ph34rb0t Did you go to “advanced -> flight control” inside the controller options? It’s there where you can specify the other axes and devices.
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
searching the forums is that the axis issue also seems to happen on Windows and the advertised solution appears to be using the AL
I’m quite sure many hundreds of people have multiple devices (stick and throttle, at least) and don’t use AL.
You might see a lot of over-simplified advice, in recent posts, in the context of helping newbs who are confused why their changes being overwritten by AL… but you are on Linux debugging Wine, so you are not one of those people.
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t Did you go to “advanced -> flight control” inside the controller options? It’s there where you can specify the other axes and devices.
Yes, of course I did. I even pre-mapped all axes in DeviceDefaults.txt.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I’m quite sure many hundreds of people have multiple devices (stick and throttle, at least) and don’t use AL.
I’d be happy without AL if it wasn’t for the issue with the devices.
You might see a lot of over-simplified advice, in recent posts, in the context of helping newbs who are confused why their changes being overwritten by AL… but you are on Linux debugging Wine, so you are not one of those people.
The explanations about issues with multiple controllers were actually quite helpful to provide a clue about what goes wrong.
However, after unsuccessfully trying to run TARGET through WINE to combine controllers into a virtual one and not finding any suitable Linux tool to do the same, I’m giving up. After all, what good is a HOTAS if it doesn’t work?
-
@ph34rb0t at some point I’ll throw Ubuntu on an old laptop and try to play along… sadly all my linux experience is server-side stuff, not desktop/gui stuff
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
Yes, of course I did. I even pre-mapped all axes in DeviceDefaults.txt.
I guessed you did, it was just wishful thinking about we being too focused on complex solutions while the easy one was there. Sorry
However, after unsuccessfully trying to run TARGET through WINE to combine controllers into a virtual one and not finding any suitable Linux tool to do the same, I’m giving up. After all, what good is a HOTAS if it doesn’t work?
I use joymap to merge my controllers into one for old games (A-10 Cuba! and EF2000). Drawback from this is you are limited to 18 buttons.
I use it also to “convert” my pedals into another controller when games don’t detect them but detect the HOTAS (EECH).
Documentation is really bad but, once I got it, it’s kind of easy and one-time set-up. Again, it’s late for me now but if you are interested I can do a tutorial tomorrow.This reminds me you can also use xboxdrv to convert anything into a virtual Xbox controller. I ignore if you can merge controllers with this option as I never went farther than converting my pedals with this approach. But I can explain the very basic way too.
-
This issue bugged me enough that I just could not let it go. I tried:
- Combining two devices into one with MoltenGamepad, which is like vjoy for Linux (does not work because the resulting virtual device is limited to 6 axes)
- Various WINE builds, including custom ones and Proton
- Various options
- Countless reinstalls
Then I got the idea that DirectInput may not like different devices with similarly named axes, so I searched the forum if somebody else had issues with the T16000M+TWCS combo.
Then I found this post: https://forum.falcon-bms.com/post/244992
I added the TWCS’ axes to the T.16000M stick in the 2D controller UI and…
Voilà, a fully functional flight setup with all assigned axis working.
However, it is is the most counterintuitive solution I have ever encountered in any flight simulator.
Now excuse I’m going to bang my head against the wall for an hour or three.
\
- Edit:
(Next stop: The “one POV hat” limit.)- Edit2:
POV limit fixed thanks to the lines for “Falcon BMS User.cfg” of Orffen’s T16000M+TWCS key file. -
Here’s a Bash script to install and manage BMS with a system-independent WINE runner and prefix. Rather simple, but enough to please my laziness.
Supports Falcon 4.0 from the Falcon Collection on GOG.It creates some subfolders to contain specific elements for managing a BMS installation and has a looping menu so you won’t have to restart it after every step.
Code:#! /bin/bash ###### # Version 20230211 ###### ## # Variables ## bms_ver=4.37 bms_storage="$PWD/z_downloader_installer" bms_installfolder="$PWD/BMS_$bms_ver" wine_runner="$PWD/0_wine_runner" #wine_runner="/usr" export WINEPREFIX="$PWD/0_wine_prefix" # loop=yes # ## # Functions ## function pause(){ read -p "$*" } # function checkdirectories(){ if [ ! -h "$bms_storage" ]; then mkdir "$bms_storage" echo "CREATED: $bms_storage"; fi if [ ! -h "$wine_runner" ]; then mkdir "$wine_runner" echo "CREATED: $wine_runner"; fi if [ ! -h "BMS_$bms_installfolder" ]; then mkdir "BMS_$bms_installfolder" echo "CREATED: BMS_$bms_installfolder"; fi } # function menu(){ if [ $1 == "main" ]; then clear echo "Falcon BMS $bms_ver WINE launcher" echo " " echo "Wine binary folder: $wine_runner " echo "Wine prefix: $WINEPREFIX " echo "BMS install folder: $bms_installfolder " echo " " echo "1) Falcon BMS $bms_ver" echo "2) Falcon BMS $bms_ver Launcher" echo "3) Falcon BMS $bms_ver Alternate Launcher " echo " " echo "4) Install or update Falcon BMS " echo " " echo "5) Manage WINE prefix " echo " " echo "6) Exit " echo " " echo "Choice [1-6]:" echo " " # Read choice read case; # Choices case $case in 1) "$wine_runner/bin/wine" "$bms_installfolder/Bin/x64/Falcon BMS.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_installfolder/Launcher.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_installfolder/Launcher/FalconBMS_Alternative_Launcher.exe"; loop=yes; break ;; 4) menu "install" ;; 5) menu "wine" ;; 6) break clear exit esac fi if [ $1 == "install" ]; then clear echo "Falcon BMS installation options " echo " " echo "1) Falcon 4.0 GOG Installer " echo "2) Falcon BMS Downloader " echo "3) Falcon BMS $bms_ver Installer " echo "4) Update Falcon BMS $bms_ver " echo " " echo "5) Return to main menu" echo " " echo "Choice [1-5]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" "$bms_storage/setup_falcon_4_2.0.0.1.exe"; "$wine_runner/bin/wine" "$PWD/Falcon 4.0/falcon4.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_storage/Falcon_BMS_Downloader.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_storage/Falcon BMS_${bms_ver}_Full_Setup.exe"; loop=yes; break ;; 4) "$wine_runner/bin/wine" "$bms_installfolder/Updater.exe"; loop=yes; break ;; 5) menu "main" ;; esac fi if [ $1 == "wine" ]; then clear echo "WINE prefix management " echo " " echo "1) WINE Configuration " echo "2) WINE Registry Editor " echo "3) WINE Control Panel " echo "4) WINE Uninstaller " echo "5) Winetricks " echo " " echo "6) Return to main menu" echo " " echo "Choice [1-6]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" winecfg; loop=yes; break ;; 2) "$wine_runner/bin/wine" regedit; loop=yes; break ;; 3) "$wine_runner/bin/wine" control; loop=yes; break ;; 4) "$wine_runner/bin/wine" uninstaller.exe; loop=yes; break ;; 5) winetricks; loop=yes; break ;; 6) menu "main" ;; esac fi } ## # Programs ## checkdirectories # while [ "$loop" = yes ]; do loop=no menu "main" done
Usage:-
Save the above code in a text file named “z_BMS_Manager.sh” (or any other name) and make sure to make the script executable.
-
Move the script to your intended BMS container folder (e.g. “Falcon_BMS/z_BMS_Manager.sh”) and run it to have it create all required folders.
-
Download a WINE build from the “Releases” page of the “Wine-builds” Github repository. Pick any “-amd64” package.
Unpack the downloaded archive, then move the “bin”, “lib” and “share” folders into “Falcon_BMS/0_wine_runner”. -
Download the BMS Downloader from the main website and the Falcon 4 installer from GOG.
Move both exe files into the “Falcon_BMS/z_downloader_installer” folder. -
Install Falcon 4 from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target should be the “Falcon 4.0” folder in the same folder as the install script (e.g. “Falcon_BMS/Falcon 4.0”).
If you stuck to the “Falcon 4.0” folder name, Falcon 4 will be started after the installation. Once it is at the main menu, exit F4. -
Run the Falcon BMS Downloader from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The download target for the installer should be “Falcon_BMS/z_downloader_installer”. -
Install Falcon BMS from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target for BMS should be the “Falcon_BMS/BMS_[version number]” folder. -
Run the BMS Updater from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
-
Launch BMS directly or with the standard or alternative launcher.
If you successfully ran all of the installers, chances are high that BMS will also run.
The script’s main menu will loop until you pick the “Exit” option, terminate it with CTRL+C or close the terminal window.
Notes:With this script, you theoretically have a completely portable BMS installation, as long as you make sure that the WINE drive letter of the partition that contains “Falcon_BMS” remains constant across computers.
You can also have multiple BMS releases exist side by side if you make a copy of the script, change the value of $bms_ver before installing any past or future BMS release and use the copied script to manage that BMS installation.Without any long-term experience (e.g. campaign), I found that I did not need any extra WINE configuration steps to run Falcon BMS and get into 3D.
However, I’ve installed DXVK with winetricks (which must be installed at system-level) to make sure that Direct3D calls are piped to Vulkan instead of OpenGL (faster!).
Disclaimer:
The script could have bugs or other deficiencies and I take no responsibilitiy if it does unintended things to everything and anything.
Feel free to modify it to your liking though.
Changelog:
2023/02/11 - Moved BMS installation options and WINE management options into submenus, added option to launch BMS’ exe directly -