Guild Wars 2 on Wine

From Guild Wars 2 Wiki
Jump to navigationJump to search

Using the Wine software, Guild Wars 2 can be run on UNIX-like operating systems, such as Linux. Though this is unsupported by ArenaNet and NCSoft, various people have reported excellent results running Guild Wars 2 on GNU/Linux.[1][2][3]

This technique can also be used to run Guild Wars 2 on macOS. ArenaNet had previously published a native 64bit macOS client[4], but that client has been discontinued on February 18, 2021.[5]

How it Works[edit]

WINE Is Not an Emulator[edit]

Many people believe Wine emulates a Windows environment and that this will result in slower performance than on native Windows. Though Wine can indeed result in slightly slower performance than a native environment, for faster systems, the difference is unlikely to be noticeable because Wine is not an emulator. Wine works by taking the Win32 system calls and redirecting them to your system's native Unix (or Linux) system calls. Wine is more of a compatibility layer than an emulator.

You may, however, encounter performance issues under Wine, which are likely caused by imperfect system call translations. Even though the Wine team is constantly improving compatibility, graphical drivers as well as Windows and the games themselves run very complex code and often the interactions among them can be less than ideal.

Additionally, there are currently many known Guild Wars 2 graphical bugs, though the game is considered playable both on WineHQ and on the Crossover database, where both consider it gold.

What Wine does[edit]

When you run a game (or any Windows executable) through Wine, it will attempt to find or create a small set of essential files that simulate a typical Windows environment, in your home directory. By default these files are assembled under `~/.wine`, and will contain a simulacre of `drive_c/` which will in turn contain directories like `Program Files/`, `users/`, `windows/` and other essential .dll and directories.

You can control the location of this directory by setting the environment variable `WINEPREFIX`, either globally or just for specific Wine sessions. It is common practice for Wine users to set a different such location for each game, so they can keep each installation separate and avoid issues caused by "DLL hell" or conflicting registry settings. An example of such a value for WINEPREFIX could be `~/games/guild_wars2`.

Wine will make sure that the game "sees" the `drive_c/` directory as it would see a native Windows system drive, and that all its basic needs are met just like in a real Windows environment.

When the game starts running, Wine "translates" on the fly between what the game expects (a Windows system with DirectX) and what the actual system can offer (a Linux system with OpenGL).

Requirements[edit]

To run Guild Wars 2 on a non-Windows operating system, you will need to install Wine on your system. Most GNU/Linux distributions offer an installation method of their own; it is advised you use it. Otherwise, you may download it at the official website and follow instructions there.

Additionally, you may need to install a proprietary graphics card driver for Guild Wars 2 to function properly. Again, it is recommended you use the installation method or package manager of your own GNU/Linux distribution. For vanilla Ubuntu users, this means using the Additional Drivers tool in the menu.

Alternative Wine versions[edit]

There are some versions of Wine which may provide better performance and/or compatibility. Most notable among them are:

  • Wine Staging: a side project of the Wine team, which maintains a set of patches meant to be applied on top of regular Wine, and which attempt to provide experimental bug fixes and features that are not ready to be included in the main Wine yet.
  • Wine Staging Nine/Gallium9: A patched version of Wine that takes advantage of the Direct3D 9 (DX9) implementation in the mesa drivers, which vastly improves performance in many DirectX 9 based games and has proven to give nearly 100% performance for Guild Wars 2. It is limited to open-source graphics drivers, which means that nVidia users need to use nouveau, and AMD users will get a native experience with the amdgpu drivers.
  • Wine PBA: an experimental Direct3D performance patch developed on top of Wine Staging.

You can attempt to apply these patches to Wine and compile it yourself, but you don't have to. You can download ready-made builds from either the PlayOnLinux build service or the Lutris build repository.

You can unpack a build (.pol files are tarballs) and run it directly, no install is necessary.

How to install Guild Wars 2[edit]

Steam[edit]

Steam now allows you to run Windows exe files on Linux

This guide will show you how to install Guild Wars 2, but it will work for any Windows exe.

Though this guide will work for any Windows exe, Steam Play's Proton might not be able to fully run a program or even start it at all.

  • First open Steam Settings
  • In the Steam Play section: Enable Steam Play for supported titles
  • Choose Proton version 5.13-6 or lower (a regression in newer versions of Proton/Wine prevents you from logging in)
  • Click Play for any another game you own on Steam that requires Proton - this will download & initialize that version of Proton you picked (You may need to configure this game to force the version of Proton instead of using the default)
  • Click "Games" on the Steam window - Add a Non-Steam Game to My Library
  • Click "BROWSE" and change File type to "All Files"
  • Select Gw2Setup-64.exe
  • Right click Gw2Setup-64.exe in your Library and click Properties
  • Check the box that says "Force the use of a specific Steam Play compatibility tool"
  • Launch Gw2Setup-64.exe from your Library
  • The Guild Wars 2 downloader will have an Install button, click it and select where you would like to install Guild Wars 2
  • Once you see the Guild Wars 2 launcher with the download bar at the bottom, you can close the window (You can continue the download anytime after the next steps. It will show starting at 0%, but it does continue where you left off)
  • Right click Gw2Setup-64.exe in your Library and click Properties
  • Change the first text box to Guild Wars 2 (the name that will show up in your Library)
  • Change "Start In" to point to where you installed Guild Wars 2 to: "/home/username/games/Guild Wars 2"
  • Change Target to "Gw2-64.exe"

Performance tweaks for Guild Wars 2: (Possible improvements depending on your system)

  • In your Guild Wars 2 Properties - Set Launch Options and add -dx9single

Possible issues:

If you have a folder or exe file with a space in the name when adding a Non-Steam Game to your Library. Steam might cut off the "Target" and "Start In" you can manually type the names in to fix the issue.

Non-standard, unsupported Linux Distros and Steam/Proton[edit]

If you play on non-standard Linux distros, the wine included with Steam/Proton might not find certain libraries. They have to be manually installed as they are not coming bundled with steam. This can and will cause anything from crashes to weird rendering issues. Not finding libfreetype, for example, will simply result in no text being displayed without anything crashing. The following list is not guaranteed to be complete, but might help. You might need both the 32 and the 64 bit versions.

  • libgnutls
  • libfreetype
  • libpng12 (later might work, at a later point in time. As of writing this, it needs to be exactly 12)
  • zlib
  • libtxc_dxtn (S3 Block texture compression BC1-BC5 -- Only needed with Mesa <17.3.x[6])
  • llvm

Having a look at the proton log files or running the game directly with wine64 can help figuring this out.

One possible crash (on Proton) is that the game opens so many file descriptors that the system hard limit kills it (you can check that number with ulimit -Hn and -Sn). You need to change those in /etc/security/limits.conf to something big (1048576 has been used successfully). Pam needs to be set up for this, too (`service optional pam_limits.so` in you login managers pam config). Most (but not all) newer distros have this issue addressed.

Lutris[edit]

Lutris is an "Open Source gaming platform for Linux" that installs and launches games on Linux. Downloading and installation is offered using community contributed installation scripts. The installation scripts for Guild Wars 2 can be found at https://lutris.net/games/guild-wars-2/ Lutris offers a simplified installation with DXVK (DirectX to Vulkan which includes Directx9 to vulkan) as well as 32-bit and 64-bit installers for older graphics cards that don't have Vulkan support.

If using an Nvidia GPU, you will get increased performance by doing the following : Install proprietary Nvidia drivers on your system. The way by which this is achieved will depend on your Linux distribution. In Lutris, select Guild wars 2. Click on the arrow next to the "Play" button at the bottom and click "Configure". Check the box that says "Show advanced options" at the bottom. Under "System Options", set "Vulkan ICD loader" to "Nvidia proprietary".

If using an AMD GPU, it may be possible to get a similar performance increase by selecting the appropriate driver under the same setting.

Bottles[edit]

Another easy yet powerful option is Bottles. Bottles is a graphical manager for WINE installations which exposes many of the newer features of WINE and related tools to a simple-to-use interface.

Starting with Bottles being installed, enter Bottles settings by entering the three bar menu and clicking 'Preferences'. Then enter the 'Runners' tab and expand the 'Lutris' dropdown. Find 'lutris-7.2-2' from the list and click the download button to install the runner. Once done installing, close the preferences. Click 'Create a new bottle' and select the 'Gaming' environment preset; give the bottle a relevant name and click 'Create'. Once created, scroll down to the bottle options and click the 'Settings' menu. Under 'Components', click the 'Runner' dropdown and change the selection to 'lutris-7.2-2', which should have been installed earlier, and wait for the change to complete. Leaving all other settings default for now, exit the settings menu and enter the 'Dependencies' menu next. Click the download button next to 'allfonts' in the dependency list and wait for it to install. Exit the dependencies menu. Finally, you should be able to 'Run executable' and run the Guild Wars 2 installer executable downloaded from the official website. From here, all installation steps should be similar to on windows. Once the patcher is installed, you should be able to log in and play normally.

Once the game is verified as working, you optionally may wish to try creating a snapshot of the bottle and then tweaking other settings in Bottles such as enabling DLSS (supported by GeForce 20XX video cards and newer), changing the synchronization method, or enabling LatencyFleX to further improve performance. You can revert to the original snapshot if you run into any unrecoverable issues.

By default, this installation method fully supports the dx11 renderer. The game may perform poorly when new shaders are encountered for the first time, but should perform substantially better when encountering shaders you have already encountered prior. These shaders are cached, so the performance pickup over time will persist between play sessions.

This method has been tested to work on Pop!_OS 22.04 on a GTX 1050 + Intel CPU and on a GTX 3060 + AMD CPU.

PlayOnLinux[edit]

PlayOnLinux is a Crossover-like front-end for Wine that simplifies the installation process of Guild Wars 2. You'll need to download and install PlayOnLinux using binaries available from the PlayOnLinux website or from your distribution's repositories. If you're using Ubuntu, PlayOnLinux is available on the Ubuntu Software Centre.

To install Guild Wars 2 using PlayOnLinux, download, install and launch PlayOnLinux and follow the first run wizard. Then, wait for the message "Refreshing PlayOnLinux" to go away from the bottom pane of the PlayOnLinux window. Once it is finished refreshing, click the "Install" button at the top of the window. This will open a new window. Select "Games" from the sidebar, and select "Guild Wars 2" from the list. (If it does not appear, you will need to check the "Testing" search option.) This will launch a step-by-step wizard that will automatically download and install pre-requisites like DirectX dlls and the Guild Wars 2 installer for you. Once the wizard is complete, Guild Wars 2 will appear in the list of games in your PlayOnLinux main window. Double-clicking it will launch the launcher for Guild Wars 2.

If you use PlayOnLinux, there is no need to manually create .desktop files or set icons for these files, since this is done for you by the wizard.

Note that in some cases playing on fullscreen might freeze your screen. If this happen when you start the game, open the Wine configuration menu for Guild Wars 2 in PlayOnLinux and enable "Emulate a virtual desktop" with your screen resolution as size.

PlayOnMac[edit]

Manual install[edit]

It is recommended to create a Wine prefix for each game installed under Wine. Some games require settings that may render other games unplayable. Creating a separate Wine prefix solves this problem. The winecfg command will create a Wine prefix in the WINEPREFIX environmental variable if the Wine prefix does not exist. The default WINEPREFIX environmental variable is "${HOME}/.wine". To create a new Wine prefix, set the WINEPREFIX environmental variable and execute winecfg. An example:

   export WINEPREFIX="${HOME}/games/guild_wars2"
   winecfg

The winecfg command will bring up a dialog window. Be sure to enable "Automatically capture the mouse in full-screen windows" on the Graphics tab. Next, install required fonts so the installer will not crash:

   winetricks fonts corefonts
   winetricks fonts tahoma

Download the Gw2.exe or Gw2-64.exe file (available here) and place it under "${WINEPREFIX}/drive_c/Program Files/Guild Wars 2/", then run it from there. WINEPREFIX specifies the directory where you've chosen to place your simulated Windows environment.

Example of how to run the game in this case:

   wine ~/games/guild_wars2/drive_c/Program\ Files/Guild\ Wars\ 2/Gw2-64.exe

or

   WINEPREFIX="${HOME}/games/guild_wars2" wine "${WINEPREFIX}/Program Files/Guild Wars 2/Gw2-64.exe"

While this method is more complicated, it can allow you access to the latest Wine builds and experimental features. However, the other methods are more user-friendly.

When the client is run, the launcher will start and download the necessary data. To run Guild Wars 2, executing the very same command should suffice.

For convenience, in most systems you can also create a desktop shortcut or a link in your Start menu to launch Guild Wars 2. Just make sure that your link executes the above command. When updating, the patcher may crash after a while; however, you can just restart it and continue the download.

The use of the 64 bit client is strongly recommended, the only exception being if you're still running a (very old) 32 bit Linux distro for some reason.

When running a manual install, the following additional settings are also recommended:

  • Run `bin/wine64` instead of `bin/wine` if running the 64 bit GW2 client.
  • Set the WINEARCH=win64 environment variable if running the 64 bit client.
  • If you are running an Wine version from a non-standard directory (as opposed to the distro version), you may need to set LD_LIBRARY_PATH="/your/package/location/lib:/usr/lib32:$LD_LIBRARY_PATH" for the 32 bit client, or LD_LIBRARY_PATH="/your/package/location/lib64/:$LD_LIBRARY_PATH" for 64 bit.
  • Guild Wars 2 now uses DirectX 11 by default. If your system does not support DirectX 11, use the -dx9 flag when launching.

See also the performance section for additional command line options, environment variables and settings that will optimize your experience.

Performance[edit]

Most up-to-date Linux distributions come with Wine 3.3 or newer that includes CSMT patch enabled to the upstream. However if you're running on an older version of Wine Staging, you can enable CSMT manually. You can do this from 'winecfg', the Staging tab should be available and have the option to use CSMT.

With every Wine release, Wine becomes more advanced on running native Windows applications on Linux. That is why you should check appdb.winehq.org from time to time for newer test results and variety of tips on running Guild Wars 2 on Linux with Wine.

Using '-dx9single' command with your game launcher could improve your performance under some circumstances. You could also install d3dx9 by using winetricks.

   $ winetricks d3dx9

For overcoming various performance issues, you can try adding a number of registry entries. It is suggested that disabling GLSL helps with a variety of Nvidia cards. While disabling it may completely break the game for some setups, it is generally worth a shot to disable and run Guild Wars 2 to check whether there's any difference. You can always turn GLSL back on.

You could use winetricks and follow the steps shown by GUI to disable GLSL or you could just use winetricks as a command.

   $ winetricks glsl=disable

Generally speaking, you shouldn't need any registry changes to enhance your gameplay performance other than specific cases like above.

  • __GL_THREADED_OPTIMIZATIONS in combination with GLSL disabled can cause fps loss, disable it when running CSMT
   $ export __GL_THREADED_OPTIMIZATIONS=0
  • The game spams a lot of fixme debug messages, causing a huge memory leak. Turning these off improves performance and stability
   $ export WINEDEBUG=-all
   $ export LOGFILE=/dev/null (optional for PlayOnLinux, keeps it from writing to the logfile)
  • Turning off Vsync and GL_YIELD might also help with fps:
   $ export __GL_SYNC_TO_VBLANK=0
   $ export __GL_YIELD="NOTHING"
  • Move Mesa cache to RAM

If the game keeps stuttering when turning the view.It is usually because of weak HDD/SSD performance and in addition because some mesa data is stored in your $HOME. First you can try to just use a faster SSD for installation. Second you can try to move your mesa cache to RAM. Most current Distros use /tmp as mounted in tmpfs (RAM) if that is the case just execute the following.

   $ cd ~/.cache/ && rm mesa && cd /tmp && ln -s ~/.cache/mesa_shader_cache mesa
  • CPU GW2 on wine depends heavily on the CPU.
   $ Your performance may suffer because of the CPU. Change some GFX settings in GW2, and, if nothing changes and GW2 is still running slow, the cause is likely the CPU. It is advised to run the CPU on max freq., with sufficient cooling.
  • In your game change the Field of View (FOV). This can give you more FPS to the cost of a smaller FOV.
  • In your game GFX settings change the shadow settings. Making it low might increase your FPS too.
  • Stuttering issues can also be resolved by using the async patch of DXVK (async-dxvk). It's the equivalent of using d912pxy on windows, but compatible with linux GPU drivers.

Troubleshooting[edit]

General:[edit]

Frequent Game Crashes (Out Of Memory Exception)[edit]

Try the 64-bit Client which allows for over 4GB RAM + GPU VRAM utilization. Download the files and drop Gw2-64.exe into your existing GW2 installation folder. Notice that for this to work, you need to use a 64-bit Wineprefix for Guild Wars 2 (PlayOnLinux defaults to 32-bit).

Freezing Desktop[edit]

This can usually be fixed by running the launcher in a virtual desktop. This can either be achieved by ticking the corresponding option in the PlayOnLinux settings / winecfg or by using the following command line:

wine explorer /desktop=gw2,1024x768 ~/Gw2.exe

A launcher freezing the desktop can also be fixed by using the 32-bit client in a 32-bit Wine prefix. This may cause the screen to be redrawn enough in order to normally launch the game. As soon as the launcher is gone, this freezing issue is gone too.

It does not actually freeze the system but causes the desktop to no longer be redrawn. You can still launch the program (game) by entering your credentials and pressing the buttons even though you will see no visual feedback of your actions.

Unable to verify Guild Wars 2 client[edit]

During first launch, the Guild Wars 2 launcher will create a new version of itself (GW2.tmp or GW2-64.tmp depending on if you use the 32-bit or 64-bit installer) but fail to copy this over the original GW2.exe/GW2-64.exe executable. To resolve this, delete the current of GW2.exe/GW2-64.exe, and then rename GW2.tmp/GW2-64.tmp to GW2.exe/GW2-64.exe.

Crashing Launcher[edit]

As mentioned above the launcher/patcher continuously crashes while downloading. The following helped me to avoid continuous restart of the launcher:

  • setup virtual windows machine in Virtualbox
  • install GW2 using Wine or PlayOnLinux
  • create symbolic link to the installation folder in home directory (only required if the path to installation folder is not accepted by next step)
  • set installation (or link) folder as shared folder with the virtual machine (requires guest additions to be installed)
  • install/update GW2 in virtual machine using shared folder and enjoy playing on Linux using Wine/PlayOnLinux

Audio problems[edit]

If you have audio problems, do the following:

  • Use the latest wine version
  • Use the latest version of pulseaudio
  • Test other programs and apps

Mouse rotation[edit]

If rotating the camera in the game halts when your cursor reaches the edge of the window (from the point where you started rotating) use the option MouseWarpOverride and set it to "enable".

In PlayOnLinux this option is in the Miscellaneous tab. In the Wine registry editor, you can find it at:

HKEY_CURRENT_USER\Software\Wine\DirectInput where you may need to create the string value "MouseWarpOverride" and set it to "enable".

If this does not work, these are several alternative solutions:

  • Run winecfg and in the Graphics tab tick "Automatically capture the mouse in full-screen windows"
  • Disable the "virtual desktop" option if using it.

Notes[edit]

  • Guild Wars 2 experiences some bugs and issues when running in Wine. They are currently best documented at Guild Wars 2's WineHQ and Crossover profiles. Some can be solved with program arguments, like the freezing during character creation or a black screen when launching the game, which can be solved with the "-dx9single" flag. Others are hardware dependent, like the NVIDIA precipitation bug. For more information on these bugs and fixes, visit one of the two profiles above.

See also[edit]

References[edit]