Difference between revisions of "Linux games"

 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Linux]]
 
[[Category:Linux]]
 +
 +
=WINE=
 +
 +
==Installation==
 +
 +
Install latest WINE version
 +
 +
<syntaxhighlight lang="bash">
 +
# Wine
 +
sudo dpkg --add-architecture i386
 +
sudo add-apt-repository ppa:wine/wine-builds
 +
sudo apt-get update
 +
sudo apt-get install --install-recommends winehq-devel
 +
# Windows fonts
 +
apt-get install ttf-mscorefonts-installer
 +
</syntaxhighlight>
 +
 +
 +
==Configure==
 +
 +
<syntaxhighlight lang="bash">
 +
/usr/bin/winecfg
 +
</syntaxhighlight>
 +
 +
# '''Install all libraries that you are asked for''' (= always say 'yes')
 +
# Go to ''Applications'' tab
 +
** Windows Version: Windows XP
 +
** Add Libraries (if not already enabled) - just copy / paste the library name:
 +
*** '''msvcp140''' (native, builtin)
 +
*** '''api-ms-win-crt-locale-l1-1-0''' (native, builtin)
 +
*** '''api-ms-win-crt -runtime-l1-1-0''' (native, builtin)
 +
*** '''api-ms-win-crt-stdio-l1-1-0''' (native, builtin)
 +
*** '''ucrtbase''' (native, builtin)
 +
*** '''vcruntime140''' (native, builtin)
 +
*** '''wininet''' (native, builtin)
 +
** Click OK
 +
 +
 +
Last, run winetricks:
 +
<syntaxhighlight lang="bash">
 +
# Required fonts
 +
winetricks corefonts
 +
# Mandatory library
 +
winetricks vcrun2015
 +
</syntaxhighlight>
 +
 +
 +
You have to re-open the wine configuration to apply settings:
 +
 +
<syntaxhighlight lang="bash">
 +
/usr/bin/winecfg
 +
</syntaxhighlight>
 +
 +
 +
==Usage==
 +
 +
Now you can launch any Windows application
 +
 +
 +
==Sources==
 +
 +
* WineHQ battle.net: https://appdb.winehq.org/objectManager.php?sClass=version&iId=28855&iTestingId=81803
 +
* http://eu.battle.net/hearthstone/de/forum/topic/17612833915
 +
* https://www.playonlinux.com/de/topic-14652-Battlenet_Laucher_nBattlenet_Laucher_not_working_after_7730_update.htmlot_working_after_7730_update.html#m58630
 +
  
  
Line 6: Line 71:
 
* Steam: http://store.steampowered.com
 
* Steam: http://store.steampowered.com
  
 +
 +
 +
 +
=Play on Linux=
 +
 +
Most windows games require you to setup and configure [https://www.playonlinux.com/ Play on Linux]
 +
 +
==Configure WINE version(s)==
 +
 +
First thing you must add some WINE version(s).
 +
* Open Play on Linux
 +
* Go to: '''Tools > Manage WINE versions'''
 +
* Select the version(s) to install. Please install, at least, a x86 and 64bits distribution. (i) Take the latest 1.9.x and 1.8.x
  
  
Line 19: Line 97:
 
* Blizzard official doc: https://us.battle.net/support/en/article/firewall-proxy-router-and-port-configuration
 
* Blizzard official doc: https://us.battle.net/support/en/article/firewall-proxy-router-and-port-configuration
 
* [[Firewall OUTPUT filters#Diablo 3|Firewall configuration]]
 
* [[Firewall OUTPUT filters#Diablo 3|Firewall configuration]]
 
  
  
Line 27: Line 104:
  
  
 +
'''graphic fix (ATI)'''
 +
 +
http://workinginavirtualspace.blogspot.com/2014/05/playonlinux-and-diablo-3-ros-get-past.html
 +
 +
 +
'''Sound fix'''
 +
 +
If your sound is cracky or if you don't have any sound...
 +
 +
<syntaxhighlight lang="bash">
 +
sudo vim /etc/pulse/default.pa
 +
</syntaxhighlight>
 +
 +
1. Comment the following lines if they are not already commented:
 +
<syntaxhighlight lang="apache">
 +
## Ensure following lines are commented
 +
#load-module module-alsa-sink
 +
#load-module module-alsa-source device=hw:1,0
 +
 +
## Comment the following block
 +
.ifexists module-udev-detect.so
 +
load-module module-udev-detect
 +
.else
 +
### Use the static hardware detection module (for systems that lack udev support)
 +
load-module module-detect
 +
.endif
 +
</syntaxhighlight>
 +
 +
2. Use the following configuration instead
 +
<syntaxhighlight lang="apache">
 +
## Wine hook
 +
load-module module-alsa-sink device=dmix
 +
load-module module-alsa-source device=dsnoop
 +
 +
# Automatically load the correct driver
 +
load-module module-udev-detect
 +
</syntaxhighlight>
 +
 +
 +
From now on your wine can use pulseaudio with ALSA. :-)
 +
 +
 +
 +
ALSA configuration. You need to create a configuration file:
 +
<syntaxhighlight lang="bash">
 +
vim ~/.asoundrc
 +
</syntaxhighlight>
 +
 +
Put the following content:
 +
<syntaxhighlight lang="cpp">
 +
pcm.!default {
 +
    @func refer
 +
    name { @func concat
 +
          strings [ "pcm."
 +
                    { @func getenv
 +
                      vars [ ALSA_DEFAULT_PCM ]
 +
                      default "pulse"
 +
                    }
 +
          ]
 +
        }
 +
}
 +
 +
ctl.!default {
 +
    @func refer
 +
    name { @func concat
 +
          strings [ "ctl."
 +
                    { @func getenv
 +
                      vars [ ALSA_DEFAULT_CTL
 +
                              ALSA_DEFAULT_PCM
 +
                      ]
 +
                      default "pulse"
 +
                    }
 +
          ]
 +
        }
 +
}
 +
</syntaxhighlight>
 +
 +
 +
Restart pulseaudio
 +
<syntaxhighlight lang="bash">
 +
pulseaudio -k
 +
pulseaudio --start
 +
</syntaxhighlight>
 +
 +
*Test your system sound (= play a music track)
 +
* Test wine sound:
 +
** <syntaxhighlight lang="bash">ALSA_DEFAULT_PCM="plug:dmix" winecfg</syntaxhighlight>
 +
** Go to the Audio tab, click "Test Sound"
 +
** If you hear the sound, and see messages like "The dmix plugin supports only playback stream", it's working.
 +
 +
 +
 +
Adjust the wine shortcut settings
 +
<syntaxhighlight lang="bash">
 +
vim ~/Desktop/Diablo\ III.desktop
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="apache">
 +
# ALSA_DEFAULT_PCM="plug:dmix" ==> sound bug fix
 +
# setarch i386 -3 ==> ATI graphic bug fix
 +
Exec=setarch i386 -3 /usr/share/playonlinux/playonlinux --run "Diablo III" %F
 +
</syntaxhighlight>
 +
 +
 +
 +
'''alternate sound solution'''
 +
 +
The following solution is also mentioned a number of times and seems to work.
 +
 +
Edit the pulseaudio configuration
 +
<syntaxhighlight lang="bash">
 +
/etc/pulse/daemon.conf
 +
</syntaxhighlight>
 +
 +
Adjust the fragment size
 +
<syntaxhighlight lang="apache">
 +
default-fragment-size-msec = 5
 +
</syntaxhighlight>
 +
 +
 +
Sources:
 +
* https://www.reddit.com/r/linux_gaming/comments/22wewb/wine_162_sound_issues_plays_extremely_quickly/
 +
* http://wiki.winehq.org/WineAndPulseaudio
 +
* https://bbs.archlinux.org/viewtopic.php?id=177979&p=2
  
  

Latest revision as of 16:04, 26 August 2016


WINE

Installation

Install latest WINE version

# Wine
sudo dpkg --add-architecture i386
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
# Windows fonts
apt-get install ttf-mscorefonts-installer


Configure

/usr/bin/winecfg
  1. Install all libraries that you are asked for (= always say 'yes')
  2. Go to Applications tab
    • Windows Version: Windows XP
    • Add Libraries (if not already enabled) - just copy / paste the library name:
      • msvcp140 (native, builtin)
      • api-ms-win-crt-locale-l1-1-0 (native, builtin)
      • api-ms-win-crt -runtime-l1-1-0 (native, builtin)
      • api-ms-win-crt-stdio-l1-1-0 (native, builtin)
      • ucrtbase (native, builtin)
      • vcruntime140 (native, builtin)
      • wininet (native, builtin)
    • Click OK


Last, run winetricks:

# Required fonts
winetricks corefonts
# Mandatory library
winetricks vcrun2015


You have to re-open the wine configuration to apply settings:

/usr/bin/winecfg


Usage

Now you can launch any Windows application


Sources


On-line gaming



Play on Linux

Most windows games require you to setup and configure Play on Linux

Configure WINE version(s)

First thing you must add some WINE version(s).

  • Open Play on Linux
  • Go to: Tools > Manage WINE versions
  • Select the version(s) to install. Please install, at least, a x86 and 64bits distribution. (i) Take the latest 1.9.x and 1.8.x


Commercial games

Diablo3

requirement

You need to open some specific ports to play Diablo3.


installation

Very good tutorial: http://www.sysads.co.uk/2014/08/install-diablo-3-on-ubuntu-14-04/


graphic fix (ATI)

http://workinginavirtualspace.blogspot.com/2014/05/playonlinux-and-diablo-3-ros-get-past.html


Sound fix

If your sound is cracky or if you don't have any sound...

sudo vim /etc/pulse/default.pa

1. Comment the following lines if they are not already commented:

## Ensure following lines are commented
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0

## Comment the following block
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

2. Use the following configuration instead

## Wine hook
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop

# Automatically load the correct driver
load-module module-udev-detect


From now on your wine can use pulseaudio with ALSA. :-)


ALSA configuration. You need to create a configuration file:

vim ~/.asoundrc

Put the following content:

pcm.!default {
    @func refer
    name { @func concat 
           strings [ "pcm."
                     { @func getenv
                       vars [ ALSA_DEFAULT_PCM ]
                       default "pulse"
                     }
           ]
         }
}

ctl.!default {
    @func refer
    name { @func concat 
           strings [ "ctl."
                     { @func getenv
                       vars [ ALSA_DEFAULT_CTL
                              ALSA_DEFAULT_PCM
                       ]
                       default "pulse"
                     }
           ]
         }
}


Restart pulseaudio

pulseaudio -k
pulseaudio --start
  • Test your system sound (= play a music track)
  • Test wine sound:
    • ALSA_DEFAULT_PCM="plug:dmix" winecfg
    • Go to the Audio tab, click "Test Sound"
    • If you hear the sound, and see messages like "The dmix plugin supports only playback stream", it's working.


Adjust the wine shortcut settings

vim ~/Desktop/Diablo\ III.desktop
# ALSA_DEFAULT_PCM="plug:dmix" ==> sound bug fix
# setarch i386 -3 ==> ATI graphic bug fix
Exec=setarch i386 -3 /usr/share/playonlinux/playonlinux --run "Diablo III" %F


alternate sound solution

The following solution is also mentioned a number of times and seems to work.

Edit the pulseaudio configuration

/etc/pulse/daemon.conf

Adjust the fragment size

default-fragment-size-msec = 5


Sources:


Open source games

Linux has some very good games too !