Jump to content

Photo
- - - - -

ARMA2/OA/CO/Demo/Free/TOH on WINE/Linux!

arma 3 linux linux server server wine

  • Please log in to reply
124 replies to this topic
Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 02 January 2012 - 16:07 #1

Hi guys, I've managed to get most of the current Bohemia Interactive games working well with WINE. You have 2 options:

Posted Image
(Full-sized image is >2MB!)

WINE:
WINE is a compatibility library that allows users to run Windows software on Linux. It's not Windows, nor is it an emulator or virtual environment like VMWare or Xen - it's a set of libraries that translate Windows function calls to their equivalent Linux versions.

You can install WINE using your distribution's package manager. For example, on Ubuntu use:

(Ubuntu users must install the WINE Team's PPA repository to provide them with up-to-date versions of WINE)
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update

Then simply install the packages:

sudo apt-get install wine1.5 winetricks

or search for 'wine' and 'winetricks' on the Ubuntu Software Center and install them. Once you've done this, open a terminal and type 'winetricks --no-isolate steam' then when Steam has been installed and you've downloaded the game, 'winetricks strictdrawordering=enabled'. Look to the 'Notes/Troubleshooting' section for further information on known bugs and workarounds.

PlayOnLinux:
  • Download PlayOnLinux by following the directions on the PlayOnLinux website.
  • Install the latest version of WINE - at least 1.5.13 - choose 'Tools' -> 'Manage WINE versions' then select either amd64 or x86 (either is fine) and '>' to install it.
  • Install Steam or ARMA II. Choose 'Install' then 'Install a non-listed program' in the bottom left. Choose to 'Install a program in a new virtual drive', call it whatever you like. Tick the first option and select the version of WINE installed earlier. Choose the ARMA II or Steam installer and follow the prompts - remember that you can move your old installation to the new prefix, look in .PlayOnLinux/wineprefix/PREFIXNAME/drive_c for your virtual 'C drive'.
  • Install required libraries and fixes. Click 'Configure' and select your new prefix, under 'Install Packages' choose to install 'xact'. Under 'Display', set 'Strict Draw Ordering' to 'enabled' and 'Video memory size' to your videocard's memory size.
  • Play! Double-click the Steam or ARMA II icon in the PlayOnLinux menu and play the game.

Manual build and install:

If you're comfortable with managing multiple WINE versions and compiling your own software, here's the information you need:

  • WINE version 1.5.13 from WineHQ website or git
  • StrictDrawOrdering enabled in registry

Example:
git clone git://source.winehq.org/git/wine.git ~/wine-git
cd ~/wine-git
git checkout wine-1.5.13
mkdir ../wine-build
cd ../wine-build
../wine-git/configure

This is where you should check everything, to make sure all the features you need are included with the build of WINE you're going to be compiling. You may need to install some libraries to satisfy dependencies, here, for example any warning about xinput or opengl is bad juju!

make -j3
make prefix="~/altwine" install

Note that 'make -j3' is for a dual-core processor - your value should be the amount of cores your processor has +1 (ie, a 6-core processor should be -j7). This speeds up compiling!

Combined Operations

Some people have reported difficulties running ARMA II: CO from Steam - there are two ways to get around this: the easiest is to right-click on OA in Steam, go into Properties and Launcher Options and add '-mod=C:\Program Files (x86)\Steam\steamapps\common\arma 2;EXPANSION;ca' or similar (pointing to your original ARMA II folder). Next time you choose 'Play Game' and click OK it'll be CO. An alternative - especially if you want to use the latest beta version of ARMA II - is to use a bash wrapper script. You could use a few case statements for different mod combinations or servers and create a menu, even.

Mods

Unfortunately, the current version of SIX Updater doesn't work at all under WINE due to it's dependency on .NET 4.0. Since many mod updates are delivered exclusively over SIX Updater, this is a problem for WINE users. SIX Updater Legacy does support Linux, but both the git versions and ruby gems are woefully out-of-date, crashing with every version of ruby and gem dependencies that I tried.

One solution is using a web interface developed by Banshee for ARMA 2 servers. This has various tools for downloading mods, starting and stopping servers and other basic administration tasks.

Alternatively, I've modified an old script made for Linux server users by Dr. Pulp that works just fine for clients. It's pretty easy to use - simply download the script, edit the ARMA_DIR directory to point to your WINE's ARMA II or OA directory and ARMA_SYNC_DIR to point to a storage directory in which you are happy keeping copies of the mods and either edit the list of mods in the MODS variable or pass each mod through as an option ('./arma2rsync ace acex acex_ru acex_usnavy' for example).

You'll need to make sure that you have rsync, gunzip and convmv installed through your package manager.

View the script here, or download it here, copy it to a folder of your choice and rename it to 'something.sh', the 'something' being entirely up to you. Make it executable (either chmod +x something.sh in the console or right-click, properties and allow execute permissions), edit the variables then execute in the terminal as above.

It wouldn't be difficult to create a Mono/GTK/Qt4 wrapper or launcher to do all this from a GUI (and even launching the game or/and connecting to servers. SIX updater-ish but lite+Linux?). If there's any demand, I'll look at freeing up some time to do so.

Success Stories

Endotic
GeForce GTX 550 Ti, ArchLinux Testing (amd64), NVIDIA 290.10
  • Wine 1.3.34 + Wine 1.3.36 (w/raw3)
FreeBSD 9 (amd64)
  • Wine 1.5.1 (w/raw3)
Funtoo (amd64), NVIDIA 302.17
  • Wine 1.5.9 (w/raw3)
AMD Radeon 6990, Funtoo (amd64), Catalyst 12.6
  • Wine 1.5.10 (w/raw3)
  • Wine 1.5.13
(Tentative success on the Radeon, still trying to track down some performance issues)

Operated
GeForce GTX 560 Ti, Slackware x86 w/PAE, Nvidia 285.05.09
  • Wine 1.3.32-1.3.36
GeForce GTX 560 Ti, Slackware x86 w/PAE, 3.1.7-zen kernel, NVIDIA 290.10
  • Wine 1.3.37

Notes/troubleshooting

There are a few issues with ARMA II and WINE at the moment, these are pretty much universal across BiStudio's current generation games:
  • BattlEye doesn't work anymore - due to BattlEye relying on a function as yet unimplemented on WINE (KiUserExceptionDispatcher), you are unable to join servers that have the BattlEye software enabled.
  • LoD issues - objects flicker and disappear, and textures decrease and increase in quality apparently at random. It might occasionally throw you off a little.
  • Muzzle flashes leave an afterburn effect and the area around your weapon is generally messed up if you don't enable StrictDrawOrdering in the WINE registry. You can do this via winetricks, the script does it automatically.
  • Shadow quality settings above or below 'medium' seem to only render gun shadows. You need to set shadows to 'medium' quality to get character shadows.
  • The player profile options screen flickers, but it's still perfectly usable. Fixed? Report here
  • Don't move your mouse during loading screens or the game may crash. Fixed
  • Sometimes the mission map entities will flicker and sometimes you lose the ability to click briefly in menus - just use the keyboard (RETURN and TAB) to navigate, and it will be fixed in the next screen. It's not bugged out on me ingame yet. Fixed
  • On ARMAII and non-beta OA, antialiasing must be set to at least 'Low' or no textures will appear and everything will go grey. Fixed
  • Sound issues Sound seems fine, use winetricks to install xact and override x3daudio1_6 under winecfg -> Libraries if there are any issues.
  • If you have other problems, try adding a 'VideoMemorySize' string set to your memory in MB (eg. 2048) in HKEY_CURRENT_USER/Software/Wine/Direct3D (create the key if it does not exist) in the WINE registry. 'wine regedit' or winetricks will work if you've installed the patched version of WINE system-wide.
  • Be sure to use the propriety graphics drivers for running games under WINE if you're looking for top performance - check with 'lsmod' that either 'nvidia', 'intel' or 'fglrx' are listed as their free and open source counterparts 'nouveau' and 'radeon' tend to lack certain features required for rendering modern 3D games (though they perform excellently for 2D applications).
  • If you have any other problems, just leave me a message here - I'll get back to you. I tested this on the systems listed under 'Endotic' above.
  • You may need to use WINE version 1.3.32 to install and patch ARMA II retail (without Steam). (Thanks Operated!)
  • On the newest WINE git builds, you may need to remove the ARMA2_OGG.cmd scripts in the arma 2/OA/BFC/PMC installation directories or it could forkbomb you by attempting to use explorer to open a web page repeatedly. If you notice any sudden slowdown during 'Installing Official Game Group, try 'killall cmd.exe' in a terminal. Fixed
  • If you're looking for absolute top performance, try editing the Makefile included with the WINE sources - do some research on CFLAGS and CXXFLAGS for your particular processor. Secondly, use a performance-optimized kernel such as the pf or ck patchsets. Thirdly, try out the BFQ scheduler. Finally, look at using schedtool to switch the application's scheduling policy to SCHED_ISO (pf and ck) or SCHED_FIFO - test them both and see which works best for your use case.

Run the Windows Server Software via WINE

As a bonus, here's a bash script to install a minimal version of WINE to a server for running the latest ARMA 2 OA, TOH or Iron Front server application. The current ARMA II Linux dedicated server application is still in development, as the devs have noted that several library and dependency updates need to be made. It works with Ubuntu, CentOS and Debian, I'll make a version for any other Linux distro if there's any demand. Note that you must run it as a non-root user - not only is this good security practise, WINE will bug out if you try to run it as root.

Known issue: the script can't currently su properly. If you don't have sudo and don't want it, add quotes like this: '' around all $(sudoequiv) commands.
Example:
  $(sudoequiv) apt-get install build-essential ia32-libs ia32-libs-dev lib32z1-dev libc6-dev-i386 libncurses5-dev libncurses5-dev libfreetype6-dev libx11-dev lib32ncurses5-dev  libxcursor-dev flex bison prelink libjpeg62-dev libpng12-dev
       BECOMES
  $(sudoequiv) 'apt-get install build-essential ia32-libs ia32-libs-dev lib32z1-dev libc6-dev-i386 libncurses5-dev libncurses5-dev libfreetype6-dev libx11-dev lib32ncurses5-dev  libxcursor-dev flex bison prelink libjpeg62-dev libpng12-dev'

Please be patient until I resolve this :)

Note that it uses Xvfb to run the server application 'headlessly' - ie. without a true x server. You can also use X11 forwarding over SSH (though this would neccessitate being constantly connected to the server) or setup x11vnc to create a VNC server that the application would run on (which would let you see errors and output). Xdotool will send keypresses to the fake X server (and any real X servers you have open) - it's used to 'OK' a possible error message concerning a missing profile file if you run the server with the wrong working directory (you should be cd'ed into the server's main directory if you run the server manually, if you didn't you'll need to kill the server process and try again, the best way to do this cleanly is 'wineserver -k') - the return keypress should not do any harm if it's not required, but you may wish to remove this part if you have another Xserver running.

To check that the ARMA II dedicated server is running use 'ps aux | grep arma' or 'netstat -pant | grep arma' - you should see a 'wine arma2oaserver.exe ...' process running and the arma2oaserver listening on a network port.

Note that it seems to work best with -malloc=system. On Iron Front, the -malloc switch is apparently disabled, so you can rename or remove the Dll directory instead.

If you're looking for absolute top performance, try editing the Makefile included with the WINE sources - do some research on CFLAGS and CXXFLAGS for your particular processor. Secondly, use a performance-optimized kernel such as the pf or ck patchsets. Thirdly, try out different IO schedulers - noop, as and deadline can all perform well, noop especially if you use a ramdisk or RAID array to store your working files (note that CFQ, the default, and BFQ are unsuitable for servers). Finally - and perhaps most importantly, for high load servers, look at using schedtool to switch the server application scheduling policy to SCHED_ISO (pf and ck) or SCHED_FIFO - test them both and see which works best for your use case. Remember that these tweaks will allocate a lot of resources to the server process, possibly causing resource exhaustion or server instability if you take them too far.

Footnote
You can try getting PlayOnMac, downloading the latest WINE git version and updating your X11.app via XQuartz if you'd like to try on Mac OSX. No news whether this works or not.

Edited by Kindling, 20 March 2013 - 00:06.
Maintenance


Dwarden
Dwarden

    BI Developer

  • 9651 posts

  • Joined: 05-March 2002
  • LocationBrno, Czech Republic

Posted 02 January 2012 - 18:34 #2

thanks Endotic for Your time on chat with me while working on this

AFAIK about MAC, i remember some tries in past , heard about success but never seen it

Edited by Dwarden, 02 January 2012 - 23:10.

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


Robster
Robster

    Gunnery Sergeant

  • Members
  • 454 posts

  • Joined: 27-September 2010

Posted 03 January 2012 - 04:52 #3

eeer

which GPU do you use? Linux based OSs often present some drivers issues...
Posted Image

Posted Image

Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 03 January 2012 - 06:38 #4

eeer

which GPU do you use? Linux based OSs often present some drivers issues...


I'm using a GeForce 550 Ti (2GB), but that reminds me - make sure to get the propriety drivers for your graphics card if you want to get good performance! To check if you're using the right drivers, try:

lsmod | egrep 'nvidia|fglrx'

If this returns anything, you have the right drivers. If not, the ATI 'catalyst' or NVIDIA drivers should be available through your package manager.

Problems are pretty rare with the Linux NVIDIA drivers - they're pretty well supported. ATI problems are more common, but I hear that people are having more success with ATI on Linux lately.

PELHAM
PELHAM

    I shall not insult moderators

  • Banned
  • 1576 posts

  • Joined: 25-November 2010

Posted 03 January 2012 - 11:23 #5

ATI is no more. Now AMD are running things and cooperating with Linux Devs the gfx drivers are fine. They take a while to catch up though, if you buy the latest card it can take 3/4/6 months to catch up with it which is one problem I had. 6800 series is supported, not sure about 6900 yet but it probably is by now. Linux is probably not a good idea for your bleeding edge gaming rig but if you have a year old PC it's fine.

Edited by PELHAM, 03 January 2012 - 11:48.


Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 03 January 2012 - 11:25 #6

ATI is no more. Now AMD are running things and cooperating with Linux Devs the gfx drivers are fine.


Well, that'll be why, then! :) Thanks for the info.

Operated
Operated

    Rookie

  • Members
  • 3 posts

  • Joined: 04-January 2012

Posted 04 January 2012 - 07:13 #7

New test results arrived! I tested wine versions from 1.3.32 to 1.3.36 and can conclude following:
1.3.32 - playable, texture flickering, sometimes crashes, when you trying to change island in editor or mission interface. Distant trees sometimes disappear for 0.5 second. OA benchmark - 15 fps.
1.3.33 - same as 1.3.32. I didn't found any performance/graphics changes.
1.3.34 - no crashing while changing island anymore, but maybe it's just me.
1.3.35 and 1.3.36 - less texture flickering, no crashes encountered. OA benchmark shows 16 fps from "cold" start.

All tests performed under Slackware x86 (PAE) on Core i7-930 (3.5GHz), 6144 RAM, GTX560Ti.
Main problem of Arma 2 under wine is performance drop. Empty Utes island gives 20-30 fps on max settings. On desert maps situation is better. You should play fullscreen, otherwise mouse will warp over window borders and even forcing mouseWarpOverride will not help. Sometimes texture layers will disappear from buildings for 0.1-0.5 sec, making them ugly. Same with trees. I think, that can be performance bottleneck, as it was with Source engine months ago. I didn't noticed any difference between "windows XP" and "windows 7" in wine prefix settings.
And one more thing: with Dominges we payed first ever MP match Arma2@Linux vs. Arma2@Windows. :) Screenshots below.

Thanks Endotic from #Arma2 for help, ideas and his great work on supporting Arma on appdb!
Bonus: Slackware i686 patched wine-1.3.36 package (slackbuild included). I recommend to use Q4wine, it simplifies install and launch your wine apps a lot.

Posted Image
Posted Image

And Multiplayer screens from my and Dominges' side:
Posted Image
Posted Image

Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 05 January 2012 - 03:21 #8

Thanks very much for the contribution, Operated! (This is Endotic, by the way.)

It'd be great if you could mention the driver version you used :)

Operated
Operated

    Rookie

  • Members
  • 3 posts

  • Joined: 04-January 2012

Posted 05 January 2012 - 07:13 #9

It'd be great if you could mention the driver version you used :)

Test preformed under proprietary Nvidia driver, version 285.05.09.

Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 06 January 2012 - 12:05 #10

Thanks, Operated! Now I wonder, are there any ATI catalyst users willing to post up some results?

eddieck
eddieck

    Staff Sergeant

  • Members
  • 373 posts

  • Joined: 11-October 2010

Posted 09 January 2012 - 07:39 #11

NICE! Does BattlEye work for MP?

Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 10 January 2012 - 11:43 #12

NICE! Does BattlEye work for MP?


I've not had any problems with playing multiplayer in popular servers, so I assume that BattlEye is working just fine. :)

Operated
Operated

    Rookie

  • Members
  • 3 posts

  • Joined: 04-January 2012

Posted 14 January 2012 - 05:38 #13

New kernel, new driver, new wine - new tests!
Still on Slackware x86 (PAE), but now powered with 3.1.7-zen kernel, Nvidia proprietary 290.10 driver and wine 1.3.37 - OA benchmark gives 24 fps.

Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 15 January 2012 - 00:09 #14

Great, thanks again Operated! I'll try building a new version here, and if there's a substantial FPS boost I'll build new binary packages.

EDIT: No substantial FPS boost, 19fps before and after on the same system as before! Might be your kernel or/and the driver change giving the FPS boost. Jury's still out, though, so if any other guys are getting a performance boost I'll build a new one.

Edited by Kindling, 15 January 2012 - 09:06.


DualJoe
DualJoe

    Sergeant

  • Members
  • 185 posts

  • Joined: 15-June 2009

Posted 15 January 2012 - 10:05 #15

Wow, didn't know someone actually pulled it off. This is great, thank you very much. I've been trying to get Armed Assault and Arma2 to work in wine for years now. Sofar I had only managed to get the GOTY edition of Operation Flashpoint working, but couldn't get past the rawinput-issue with the newer installments.

Even better if the bistudio tools work under wine as well, that would save me an enormous amount of time. I just can't get used to working in windows anymore.

Oh by the way, my brother in law recently bought ArmaX and apparently he had no problems playing the games with vmware player on ubuntu with a core2duo and a nvidia 9600GT.

Edited by DualJoe, 15 January 2012 - 10:19.


Thread Starter
Kindling
Kindling

    Sergeant

  • Members
  • 124 posts

  • Joined: 31-December 2011

Posted 16 January 2012 - 06:23 #16

Well, that's certainly interesting! I wasn't aware that VMWare had any graphical acceleration capabilities - I'm a qemu guy myself. I didn't even think ARMA II could run on a Core 2 Duo with a 9600GT!

I've not tried the BiStudio tools yet, feel free to do that and post up some results. I'd love to hear of any benchmarks or tweaks for the game, too, when you get it working!

Unfortunately, Armed Assault doesn't seem to render any icons properly. I've been planning to mess around with that when I have some time, as other WINE denizens have reported that the menu does work with previous versions - a little regression testing there might bear fruit.

Best of luck!

Nicholas
Nicholas

    Warrant Officer

  • Members
  • 2966 posts

  • Joined: 31-July 2008

Posted 16 January 2012 - 06:33 #17

I have been interested in Linux distributions for many years, but the lack of gaming held me back. I have had Fedora installed on my netbook for a few years now. Maybe I'll switch my desktop over soon as well.
"The greatest way to avenge your enemy is by learning to forgive." - Takashi Tanemori

Opt Into the Development Build

AMD Drivers | NVIDIA Drivers


DualJoe
DualJoe

    Sergeant

  • Members
  • 185 posts

  • Joined: 15-June 2009

Posted 16 January 2012 - 10:22 #18

@Kindling: Don't look down on the old core2duo, my current e8500 pc has no problem running Arma2CO with all the graphical goodies at well over 30 fps. Nevertheless I was surprised about 3d working in a virtual machine as well, without vga-passthrough. He seemed to be pretty confused with all the similarly named titles, from what I gathered he hasn't tried ArmaIIOA yet, but had started with ArmedAssault (not cold war crisis). I asked him to run fraps and he was getting around 18 fps while (accidentally) running 2 instances of Armed Assault. Running a single instance was completely playable according to him.

I'll start experimenting once my new pc is delivered. I made sure that it has IOMMU so I could experiment with vga-passthrough, because I'm sick and tired of having to reboot just to run windows.

@Dice: ArmaIICO is the only reason I still have a windows partition. If you don't mind the occasional tinkering playing windows games on linux doesn't seem to be as big of a problem as it used to be, even for beginners. Just make sure you have a NVIDIA-videocard. playonlinux looks promising for non-tinkerers.

Freedom is the most important thing for me. And the way Microsoft and Apple try to limit me frustrates me to no end. Hmm, come to think of it, maybe that's why I like bistudio games so much, if only they'd release their games for linux as well.

Edited by DualJoe, 16 January 2012 - 12:30.


fraczek
fraczek

    Staff Sergeant

  • Members
  • 399 posts

  • Joined: 05-February 2012

Posted 13 February 2012 - 13:14 #19

AFAIK about MAC, i remember some tries in past , heard about success but never seen it


I am actually trying to run it on a Mac (with powerful enough GFX card of course), and the trouble is getting compiled a recent enough version of Wine with Rawinput patch. All the binaries I could find with rawinput patch already in were a little old for good 3D look (too much artifacts and slow). While Wine 1.4RC2 did run it somewhat well (without seeing any artifacts and not much LOD flickering as far as I could tell), without a rawinput patched version I couldn't get past the initial game menu (without rawinput, the game doesn't get any mouse or keyboard support from Wine). And compiling my own I get stuck.

I will try more, it would be pretty nice not to have to reboot into BootCamp everytime I just want to try some small mission in the editor or a quick match. I understand the performance is gonna be lower, but for testing purposes and quick multiplayer with grass/postprocess turned off on many public servers anyway it might not be so bad.

Gabe_Ruckus
Gabe_Ruckus

    Sergeant

  • Members
  • 193 posts

  • Joined: 05-December 2006

Posted 09 March 2012 - 03:44 #20

I did do some messing around with Arma2 and ToH in bootcamp on a nice new Imac, and I had mixed results. Graphically, the Imac pulls ahead pretty well. It's got a 4970m graphics chip, vs the laptop's 460m. Textures look stunning on the Imac, and 1080p on a 27 inch screen is something to behold.

I think the CPU bottleneck is going to keep me playing games on the ASUS laptop, though. Any significant number of AI or things going on in the background really bog down the Imac, even in Windows 7 64 bit installed with Boot Camp. I'm just going to invest in a faster hard drive for the laptop and use it strictly for gaming.

On another note, PiP on ToH had ZERO effect on performance, regardless of quality settings, something I've felt I've been missing on the ASUS, as even low PiP settings chop 10-15 fps off the game with the 460M

I haven't tried with Wine, I'm still learning the mac interface (First Mac I've ever owned), and even with a PC mouse (Because I'm not re-learning how to use a mouse after 24 years of gaming) I'm still not sure how to go about doing things like that. Honestly, I got it mostly for recording anyway, so keeping the laptop for gaming and the Imac for music and photography works pretty well for me. I think I can squeeze another year out of the ASUS before I build a desktop next January.



Also tagged with one or more of these keywords: arma 3, linux, linux server, server, wine