Client on Linux Manual: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Needs Checking|MTA: SA 1.5 and greater versions seem to have problems when launching under Wine. Please consider rewriting this manual to point people to use an alternative (like VMWare) instead.}}
{{Needs Checking|MTA:SA support on Linux is on a best-effort basis, and you can run into a long list of issues. Also see "Known issues" paragraph}}
{{Warning|This page is for Linux players '''ONLY''', for Windows go [[Client Manual|here]].|true}}
{{Warning|This page is for Linux players '''ONLY''', for Windows go [[Client Manual|here]].|true}}
==Lutris==
Lutris can be used instead for easier Prefix management, see
[[Client on Linux using Lutris Manual]]
==Before you start==
==Before you start==


First of all, please ensure your computer fits the requirements needed.
First of all, please ensure your computer fits the requirements needed.
Read the [[Client_Manual|Client Manual]] page for further informations, or join us on IRC @ irc://irc.multitheftauto.com/mta
Read the [[Client_Manual|Client Manual]] page for further informations, or join us on [https://mtasa.com/discord Discord].
 
During this tutorial, make sure to '''only use 32-bit Wine prefix''' for MTA:SA, or else you'll run into a plethora of hard-to-fix issues.


===Requirements===
===Requirements===
The hardware requirements for Multi Theft Auto: San Andreas are the same than on Windows.
The hardware requirements for Multi Theft Auto: San Andreas are the same as on Windows.
For software requirements, you need:
For software requirements, you need:
* Wine (get it on your package manager (synaptic, apt, pacman, yum etc.); follow instructions [https://www.winehq.org/download/ubuntu here] if you're using Ubuntu
* Wine (get it on your package manager (synaptic, apt, pacman, yum, etc.); follow instructions [https://www.winehq.org/download/ubuntu here] if you're using Ubuntu; (Install Wine Staging if you want better audio quality (experimental))
(as of MTA 1.4.1 Ubuntu's default Wine package seems to be incompatible with Visual C++, which is required to install MTA)
* Winetricks (same as wine, get it on your package manager, or follow instructions [https://wiki.winehq.org/Winetricks here])
* Windows fonts installed:
* 32-bit GPU mesa drivers for your GPU (for arch, use package lib32-mesa)
* 32-bit Audio drivers (for arch, follow instructions [https://wiki.archlinux.org/title/wine#Sound here]
* TLS libraries (for arch, use packages gnutls and lib32-gnutls)
* MTA:SA version 1.6 or newer (1.6 contains many improvements for Wine)
* Windows fonts:
** tahoma.ttf
** tahoma.ttf
** tahomabd.ttf
** tahomabd.ttf
** verdana.ttf
** verdana.ttf
Get them on the Internet, e.g. [http://fontonic.com/ fontonic.com]


Or get the zip archive with the 3 fonts here: [https://drive.google.com/file/d/0ByKqpneltLO3X0ExV0NQNDhWclk/view?usp=sharing wine_mtasa_fonts.zip]
You can download them from following places:
* Get them on the Internet, e.g. [http://fontonic.com/ fontonic.com]
* Get the zip archive with the 3 fonts {{WineFonts}}.
* Get them via your package manager (apt, pacman (ttf-tahoma and ttf-ms-fonts from AUR))


SHA256 of the archive: a27c01a4e2aa61f364e6a99ff1d0591a155421ce1882dbf3c54f7d6ad8d3db6a
==Create new 32-bit prefix==
Install them in: <syntaxhighlight lang="lua">~/.wine/dosdevices/c:/windows/Fonts/</syntaxhighlight>
 
(~/ points to your user home folder on Linux, .wine is the default wineprefix)
Firstly, we need to create 32-bit prefix, as default Wine prefix is almost always 64-bit:
 
# Start Winetricks
# Select '''Create new prefix'''
# Select '''32-bit prefix'''
# Write name of prefix, we will use '''mtasa'''


==Installing the game==
==Installing the game==
Download the MTA installer from [http://www.mtasa.com mtasa.com], ensure you can launch it (chmod +x) then install it when you want.
(You can skip this if you installed the game via Steam or other supported Games Store)
Install the game from DVD or ISO into our prefix, by executing following command:
<syntaxhighlight lang="bash">
WINEPREFIX=~/.local/share/wineprefixes/mtasa wine /mnt/setup.exe
</syntaxhighlight>
(Replace /mnt/setup.exe with path to installer's setup.exe)
 
Complete the installation as usual, you can keep installation path as is.<br/>
Afterwards, download the MTA installer from [http://www.mtasa.com mtasa.com], and execute it inside our prefix with following command:
<syntaxhighlight lang="bash">
WINEPREFIX=~/.local/share/wineprefixes/mtasa wine ~/Downloads/mtasa-1.6.exe
</syntaxhighlight>
(As previously, change path to the installer)<br/>
Keep the options as is, only change is required if installation path of GTA is different from default, in that case, browse the path to the game.
 
==Configuring prefix==
 
Firstly, we need to assure that our prefix have required fonts, mentioned in Requirements part. If you installed those fonts via package manager or into your Linux system, Wine should be able to pick them up automatically.<br/>
If that doesn't work, manually install them in <syntaxhighlight lang="lua">~/.local/share/wineprefixes/mtasa/drive_c/windows/Fonts</syntaxhighlight>.


==Running the game==
If you installed Wine Staging, we can enable '''Environmental Audio Extensions (EAX)''', which is experimental feature, although I didn't encountered any issues with it.
Once installed, double-clicking on the Multi Theft Auto.exe should work. If not, try in a terminal the following command: "wine Multi Theft Auto.exe" in the directory you installed Multi Theft Auto to.
You can enable it as follows:
If it doesn't work, check the contents of the file c:/Program_Files/Multi Theft Auto/MTA/CEGUI.log, which may contain useful information.


==Known issues==
# Open Winetricks
===Specific issues===
# Select '''mtasa prefix'''
* Impossible connection through the server browser [Fixed in the [http://bugs.mtasa.com/view.php?id=5084 5084 bug] ]
# Select '''Run winecfg'''
# Go to '''Staging''' tab
# Enable Environmental Audio Extensions (EAX)


* MTA won't start on Ubuntu 12.04 LTS [Temporary fix is available [http://forum.mtasa.com/viewtopic.php?p=434011#p434011 here] ]
==Running the game==
Once installed, double-clicking on the Desktop shortcut or menu item should work. If not, try in a terminal the following command:
<syntaxhighlight lang="bash">
WINEPREFIX=~/.local/share/wineprefixes/mtasa wine ~/.local/share/wineprefixes/mtasa/drive_c/Program\ Files/MTA\ San\ Andreas\ 1.6\Multi\ Theft\ Auto.exe
</syntaxhighlight>


===Other issues===
===Known issues===
* MTA isn't starting (even with fonts installed)
* MTA isn't starting (even with fonts installed)
#Try to start MTA:SA in a virtual desktop
#Try to start MTA:SA in a virtual desktop
Line 43: Line 85:
#:which is located in the "GTA San Andreas User Files" folder, which can be found in your home directory.<br>'''(Remember to create a copy, if you're playing San Andreas in singleplayer)'''
#:which is located in the "GTA San Andreas User Files" folder, which can be found in your home directory.<br>'''(Remember to create a copy, if you're playing San Andreas in singleplayer)'''
#Try to delete your MTA config file
#Try to delete your MTA config file
#:which is: "MTA San Andreas 1.3/MTA/coreconfig.xml"<br>'''(Also remember to create a copy, if you don't want to lose your edited MTA configuration)'''
#:which is: "MTA San Andreas 1.6/MTA/coreconfig.xml"<br>'''(Also remember to create a copy, if you don't want to lose your edited MTA configuration)'''
 
* "SD #16 Error" when connecting to a server
* "No audio card detected" when launching either GTA:SA or MTA
* Using standard Full-screen mode on MTA might cause some occasional artifacts
* Enabling DXVK might not break GTA:SA, but it breaks MTA
* Using Linux brings a higher-than-usual chance for game crashes due to various reasons (sometimes to do with resources & mods on individual servers)
* CEF crashes with some wine versions. Use [https://github.com/multitheftauto/mtasa-blue/issues/1000 workaround] for this issue
<br><br>
'''* Making the mistake of using a 64-bit prefix may ''specifically'' result in:'''
* "SD #16 Error" when connecting to a server
* "libcef.dll" MTA crash upon joining servers, or during gameplay (when server uses CEF and your CEF web browser is enabled)
* Even higher chance for instability, lag issues and game crashes
.. and much more


* Crash when connecting
<br>
*:Sometimes the audio-server makes problems (could be related to pulseaudio), in this case you've to go to WineConfig and choose the tab Audio, then deselect "ALSA" and select "EsoundD". Save the settings and restart MTA.
 
* Crash in basswma.dll module while streaming audio
===Specific issues with workarounds===
*:Install Windows Media Player 10
<br>
*:
'''Crash when connecting'''<br>
Sometimes the audio-server makes problems (could be related to PulseAudio), in this case, you've to go to WineConfig and choose the tab Audio, then deselect "ALSA" and select "EsoundD". Save the settings and restart MTA.<br><br>
'''Crash in basswma.dll module while streaming audio'''<br>
Workaround: Install Windows Media Player 11<br>
Before carrying this out, [https://wiki.winehq.org/Winetricks install Winetricks]
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
winetricks wmp10
winetricks -q wmp11
 
If that doesnt solve the issue, try an older version:
winetricks -q wmp10
</syntaxhighlight>
</syntaxhighlight>
* Special Detections (SD)
 
*:If you are using a 64 wine version you may have problems with [http://wiki.multitheftauto.com/wiki/Anti-cheat_guide#.3Cenablesd.3E.3C.2Fenablesd.3E Special Detections]. If the server you are trying to connect keeps showing something like [http://i.imgur.com/33T8a82.jpg this], then you should make a [http://wiki.archlinux.org/index.php/Wine#Using_WINEARCH 32 bit wine prefix] (or bottle).
'''Special Detections (SD)'''<br>
*:
This was already described above in general terms, of possible issues if you're not using 32-bit prefix as is recommended. But for this "Specific issues" section we will go in-depth more regarding '''SD #21''' kick from AC that commonly affects Linux/Wine users:<br>
If you are using a 64-bit wine version/prefix you may have problems with [http://wiki.multitheftauto.com/wiki/Anti-cheat_guide#.3Cenablesd.3E.3C.2Fenablesd.3E Special Detections]. If the server you are trying to connect keeps showing something like [http://i.imgur.com/33T8a82.jpg this], then you should make a [https://wiki.archlinux.org/title/Wine#WINEARCH 32 bit wine prefix] (or bottle).
 
<syntaxhighlight lang="lua">export WINEARCH=win32 WINEPREFIX=~/.winegta
<syntaxhighlight lang="lua">export WINEARCH=win32 WINEPREFIX=~/.winegta
winecfg</syntaxhighlight>
winecfg</syntaxhighlight>
Change Windows version on bottom to Windows 7 and press OK. Now you have a 32 bit wine prefix on ~/.winegta.
Look at your Windows version and press OK to create the prefix. Now you have a 32-bit wine prefix on ~/.winegta.
Install GTA:SA and them MTA.
Install GTA:SA and them MTA.
After this, MTA and GTA have been installed within ~/.winegta prefix which is a 32 bit wine environment.
After this, MTA and GTA have been installed within ~/.winegta prefix which is a 32-bit wine environment.
 
'''Note''': In some scenario's, while creating your 32-bit prefix, it may be needed to change Windows version on the bottom to Windows 7. But avoid it whenever possible.
<br><br>
'''Font Artifacts'''<br>
If you see weird fonts artifacts [https://media.discordapp.net/attachments/278521065435824128/1000827089022373978/unknown.png like this] then you need to add a new DLL override to your prefix/bottle. <br>
#Open '''Wine configuration''' for your prefix/bottle, go to the Libraries tab
#Click on the ''''New override for library''':' dropdown and select ''''d3dx9_42''''
#Click on ''''Edit...'''' and select ''''Builtin (Wine)'''' then 'OK'
Apply all the changes and you're good to go.<br>
(Make sure you have ''''d3dx9_42'''' installed in your prefix)
<syntaxhighlight> winetricks d3dx9_42</syntaxhighlight><br><br>
 
'''Closing words'''<br>
To avoid many of the roadblocks when it comes to Linux/Wine issues in general, just use 32-bit Prefix as suggested. However, if you still run into issues, you can inform yourself better about MTA's Linux/Mac support levels and background by joining the [https://discord.gg/mtasa MTA discord] and going to #help-support channel, to specifically read information at this pinned message: https://discord.com/channels/278474088903606273/278521065435824128/894932698269900830
<br>
 
We realize that the wiki pages & documentation regarding Linux, macOS support (such as: through Wine, Lutris, PlayOnLinux, Parallels Desktop etc) is far from perfect, and that the list of potential issues you can run into isn't complete. As the MTA discord linked post tries to explain, these platforms are supported on a best-effort basis (in a technical sense, not an user support sense) and even then you'll find others on the MTA discord that are Linux users & play MTA after performing some workarounds, that may be willing to help you. These people are also advised to add any known issue (and workaround for it) to the wiki documentations, so if that sounds like you then feel free to edit this page for instance, and help future users that find themselves in the same situation as you were. Linux/Wine just gives really obscure, hard to fix issues with MTA and other applications/games, including niche ones that individual users happen to resolve somehow.. that's the point.


== See Also ==
== See Also ==

Latest revision as of 08:30, 29 June 2023

Dialog-information.png This article needs checking.

Reason(s): MTA:SA support on Linux is on a best-effort basis, and you can run into a long list of issues. Also see "Known issues" paragraph
Dialog-warning.png Warning: This page is for Linux players ONLY, for Windows go here.

Lutris

Lutris can be used instead for easier Prefix management, see Client on Linux using Lutris Manual

Before you start

First of all, please ensure your computer fits the requirements needed. Read the Client Manual page for further informations, or join us on Discord.

During this tutorial, make sure to only use 32-bit Wine prefix for MTA:SA, or else you'll run into a plethora of hard-to-fix issues.

Requirements

The hardware requirements for Multi Theft Auto: San Andreas are the same as on Windows. For software requirements, you need:

  • Wine (get it on your package manager (synaptic, apt, pacman, yum, etc.); follow instructions here if you're using Ubuntu; (Install Wine Staging if you want better audio quality (experimental))
  • Winetricks (same as wine, get it on your package manager, or follow instructions here)
  • 32-bit GPU mesa drivers for your GPU (for arch, use package lib32-mesa)
  • 32-bit Audio drivers (for arch, follow instructions here
  • TLS libraries (for arch, use packages gnutls and lib32-gnutls)
  • MTA:SA version 1.6 or newer (1.6 contains many improvements for Wine)
  • Windows fonts:
    • tahoma.ttf
    • tahomabd.ttf
    • verdana.ttf

You can download them from following places:

  • Get them on the Internet, e.g. fontonic.com
  • Get the zip archive with the 3 fonts here.
  • Get them via your package manager (apt, pacman (ttf-tahoma and ttf-ms-fonts from AUR))

Create new 32-bit prefix

Firstly, we need to create 32-bit prefix, as default Wine prefix is almost always 64-bit:

  1. Start Winetricks
  2. Select Create new prefix
  3. Select 32-bit prefix
  4. Write name of prefix, we will use mtasa

Installing the game

(You can skip this if you installed the game via Steam or other supported Games Store) Install the game from DVD or ISO into our prefix, by executing following command:

WINEPREFIX=~/.local/share/wineprefixes/mtasa wine /mnt/setup.exe

(Replace /mnt/setup.exe with path to installer's setup.exe)

Complete the installation as usual, you can keep installation path as is.
Afterwards, download the MTA installer from mtasa.com, and execute it inside our prefix with following command:

WINEPREFIX=~/.local/share/wineprefixes/mtasa wine ~/Downloads/mtasa-1.6.exe

(As previously, change path to the installer)
Keep the options as is, only change is required if installation path of GTA is different from default, in that case, browse the path to the game.

Configuring prefix

Firstly, we need to assure that our prefix have required fonts, mentioned in Requirements part. If you installed those fonts via package manager or into your Linux system, Wine should be able to pick them up automatically.

If that doesn't work, manually install them in

~/.local/share/wineprefixes/mtasa/drive_c/windows/Fonts

.

If you installed Wine Staging, we can enable Environmental Audio Extensions (EAX), which is experimental feature, although I didn't encountered any issues with it. You can enable it as follows:

  1. Open Winetricks
  2. Select mtasa prefix
  3. Select Run winecfg
  4. Go to Staging tab
  5. Enable Environmental Audio Extensions (EAX)

Running the game

Once installed, double-clicking on the Desktop shortcut or menu item should work. If not, try in a terminal the following command:

WINEPREFIX=~/.local/share/wineprefixes/mtasa wine ~/.local/share/wineprefixes/mtasa/drive_c/Program\ Files/MTA\ San\ Andreas\ 1.6\Multi\ Theft\ Auto.exe

Known issues

  • MTA isn't starting (even with fonts installed)
  1. Try to start MTA:SA in a virtual desktop
    Go to WineConfig, choose the tab "Graphics" and select "Emulate a virtual desktop".
  2. Try to delete your gta_sa.set file
    which is located in the "GTA San Andreas User Files" folder, which can be found in your home directory.
    (Remember to create a copy, if you're playing San Andreas in singleplayer)
  3. Try to delete your MTA config file
    which is: "MTA San Andreas 1.6/MTA/coreconfig.xml"
    (Also remember to create a copy, if you don't want to lose your edited MTA configuration)
  • "SD #16 Error" when connecting to a server
  • "No audio card detected" when launching either GTA:SA or MTA
  • Using standard Full-screen mode on MTA might cause some occasional artifacts
  • Enabling DXVK might not break GTA:SA, but it breaks MTA
  • Using Linux brings a higher-than-usual chance for game crashes due to various reasons (sometimes to do with resources & mods on individual servers)
  • CEF crashes with some wine versions. Use workaround for this issue



* Making the mistake of using a 64-bit prefix may specifically result in:

  • "SD #16 Error" when connecting to a server
  • "libcef.dll" MTA crash upon joining servers, or during gameplay (when server uses CEF and your CEF web browser is enabled)
  • Even higher chance for instability, lag issues and game crashes

.. and much more


Specific issues with workarounds


Crash when connecting
Sometimes the audio-server makes problems (could be related to PulseAudio), in this case, you've to go to WineConfig and choose the tab Audio, then deselect "ALSA" and select "EsoundD". Save the settings and restart MTA.

Crash in basswma.dll module while streaming audio
Workaround: Install Windows Media Player 11
Before carrying this out, install Winetricks

winetricks -q wmp11

If that doesnt solve the issue, try an older version:
winetricks -q wmp10

Special Detections (SD)
This was already described above in general terms, of possible issues if you're not using 32-bit prefix as is recommended. But for this "Specific issues" section we will go in-depth more regarding SD #21 kick from AC that commonly affects Linux/Wine users:
If you are using a 64-bit wine version/prefix you may have problems with Special Detections. If the server you are trying to connect keeps showing something like this, then you should make a 32 bit wine prefix (or bottle).

export WINEARCH=win32 WINEPREFIX=~/.winegta
winecfg

Look at your Windows version and press OK to create the prefix. Now you have a 32-bit wine prefix on ~/.winegta. Install GTA:SA and them MTA. After this, MTA and GTA have been installed within ~/.winegta prefix which is a 32-bit wine environment.

Note: In some scenario's, while creating your 32-bit prefix, it may be needed to change Windows version on the bottom to Windows 7. But avoid it whenever possible.

Font Artifacts
If you see weird fonts artifacts like this then you need to add a new DLL override to your prefix/bottle.

  1. Open Wine configuration for your prefix/bottle, go to the Libraries tab
  2. Click on the 'New override for library:' dropdown and select 'd3dx9_42'
  3. Click on 'Edit...' and select 'Builtin (Wine)' then 'OK'

Apply all the changes and you're good to go.
(Make sure you have 'd3dx9_42' installed in your prefix)

 winetricks d3dx9_42



Closing words
To avoid many of the roadblocks when it comes to Linux/Wine issues in general, just use 32-bit Prefix as suggested. However, if you still run into issues, you can inform yourself better about MTA's Linux/Mac support levels and background by joining the MTA discord and going to #help-support channel, to specifically read information at this pinned message: https://discord.com/channels/278474088903606273/278521065435824128/894932698269900830

We realize that the wiki pages & documentation regarding Linux, macOS support (such as: through Wine, Lutris, PlayOnLinux, Parallels Desktop etc) is far from perfect, and that the list of potential issues you can run into isn't complete. As the MTA discord linked post tries to explain, these platforms are supported on a best-effort basis (in a technical sense, not an user support sense) and even then you'll find others on the MTA discord that are Linux users & play MTA after performing some workarounds, that may be willing to help you. These people are also advised to add any known issue (and workaround for it) to the wiki documentations, so if that sounds like you then feel free to edit this page for instance, and help future users that find themselves in the same situation as you were. Linux/Wine just gives really obscure, hard to fix issues with MTA and other applications/games, including niche ones that individual users happen to resolve somehow.. that's the point.

See Also