Why are my games so slow through WINE?

Discovering I needed Wine to run anything Windows-based. I discovered I'd need DirectX to do anything significant, which in turn needed .NET framework. Using this (http://www.dedoimedo.com/games/wine-directx.html) tutorial for DirectX and downloading Wine 3.5 off of WineTricks, I thought I had everything sorted. Unfortunately, I don't. What worked fine on Windows either doesn't work or runs like it was stuck in molasses. Now, I know there are a lot of programs that have compatibility issues with Wine but what I don't understand is the slow-running programs part. Here are my system specs:

Toshiba Satellite L455D-S5976
CPU: AMD Sempron SI-42 Single-core 2.1 GHz
RAM: 3GB (2.7 technically)
HDD: 500GB
GPU:  ATI Mobility Radeon HD 3100

Here's a partial list of the games I've been trying:

  • Supreme Commander
  • Command and Conquer: Generals (Zero-Hour)
  • Assassin's Creed
  • World in Conflict
  • Star Ruler (Blind Mind Studios)
  • Trackmania (Nadeo)
  • Battlefield 2
  • X3:Terran Conflict (Egosoft)
  • Rubber Ninjas Sim City 4

I would think that it was just my system being slow—I don't have the system requirements to really run AC—but here's the weird part. In the opening intro, it'll run at around 10FPS for about 3 seconds, and then 60 or so, faster than it ever had on my previous laptop which was actually better than this current one. And, for example, games like Rubber Ninjas, C&C, SupCom, and WiC all ran smoothly on my first laptop which was similarly specced to this one.

Oh! And another quick question—when I first installed WINE, unconfigured, I installed Derek Smart's Universal Combat and it worked fine. Now after some other games and some reconfiguring, it won't work at all, even if I reset to default settings.

So, am I doing something wrong? Does Wine need to be configured differently? I'm completely lost, here, and any help would be -greatly- appreciated, thank you. I do sincerely apologize for the wall of text, here, but I didn't want to leave any detail out, as that tends to make things harder for all parties involved.

P.S: I recently discovered ClockGen, found here (http://www.techspot.com/community/topics/overclocking-a-toshiba-satellite-laptop.32667/): and was wondering, is overclocking a viable solution? I don't remember what command I used to find my CPU speed—but it said my current speed was 2100MHz (aka 2.1 gigs), but the kicker was that my “max” speed was 4,000 MHz. Now, I would never DREAM of overclocking a laptop, or even a desktop, to that ridiculous speed, but even if I could get 2.4 or 5 out of it...and I would take full responsibility for the wrath I incur from the laptop gods. I would never run this thing unplugged—I don't anyway already so a battery's pretty much moot for me...and I have a high-speed fan running under any laptop at all times—scorched my pants with my first laptop and have been wary ever since.


Solution 1:

TL;DR: This post explains how to run any game using Proton

Proton is a software that allows you to run Windows games on Linux. It is developed by Valve.

It is essentially a "Wine distribution", in the sense that it uses Wine in the background, but it is enhanced.

The Wine version that comes with it has been compiled with parameters that enhances speed. Most importantly, the wined3d stack, which translates DirectX calls to OpenGL, has been substituted. If the game runs on DirectX 9/10/11, DXVK is used to translate DirectX calls to Vulkan. If the game runs on DirectX 12, VKD3D will translate DirectX calls to Vulkan. These implementations are much much faster than the native ones.

Although Proton is "normally" used by Steam to run games downloaded by Steam itself, you can ticker with it to run any game you wish. For example, I am running Overwatch (downloaded through Battle.net) using Proton.

Here is a concept of proof on how you can use Proton to run any game.

We won't be compiling Proton from sources. Instead, we will use the pre-compiled package that comes with Steam. So, first of all, download Steam, run it, and have it download a version of Proton.

  1. Locate Proton folder. This usually will be a sub-folder under $HOME/.local/share/Steam/steamapps/common. In this folder you can find different versions of Proton, each in its own subfolder. Choose a version of Proton (most likely you will want the most recent one). In this example we will use Proton 5.13. Copy the "Proton 5.13" subfolder somewhere else, let's say in $HOME/bin/Proton

  2. Open $HOME/bin/Proton/proton (it's a Python 3 script) and comment out the line

    self.env["WINEPREFIX"] = g_compatdata.prefix_dir

    by putting a # before it. We don't want Proton to run the above line. We will provide our own WINEPREFIX.

  3. Locate Steam's COMPATDATA folder. This usually will be a subfolder of $HOME/.local/share/Steam/steamapps/compatdata. In that folder you will find different subfolders whose names are made up entirely by numbers. This number-only subfolders are COMPATDATA folder. For example, my COMPATDATA subfolder is $HOME/.local/share/Steam/steamapps/compatdata/389730. Substitute the last part with your own number. In case multiple numbered folders show up, choose the highest number.

  4. VERY IMPORTANT: if you have more than one graphics card, for instance integrated and dedicated (like most laptops), DXVK require you to specify which one to use (you will want to use the dedicated one). See DXVK README on how to achieve this. Basically run:

    vulkaninfo | grep "GPU id :"

    you will obtain an output like:

    GPU id : 0 (GeForce GTX 1060):

    GPU id : 1 (Intel(R) UHD Graphics 630 (CFL GT2))

    The name in parentheses are the names of your graphic cards. Choose one for DXVK. We will choose the NVIDIA GeForce one in this example. DXVK can match sub-strings! So it is sufficient to use "GeForce". This is non-ambiguous and DXVK as said can match on sub-strings. So it will know which one to use.

  5. Choose a WINEPREFIX (basically a location) in which to install your game. $HOME/.wine is fine for most users.

  6. Here is a concept of proof of the script to run your game using Proton. Save it somewhere and name it launch_proton.sh. Call it like this: ./lunch_proton.sh game.exe. (of course remember to chmod +x launch_proton.sh). SUBSTITUTE THE VARIABLES AT THE START OF THE SCRIPT WITH THE VALUES YOU FOUND IN THE PREVIOUS POINTS.

#!/usr/bin/env bash

# Modify these
export DXVK_FILTER_DEVICE_NAME="GeForce"
protonfolder="$HOME/bin/Proton"
export STEAM_COMPAT_DATA_PATH="$HOME/.local/share/Steam/steamapps/compatdata/389730"

# Modify if needed
export WINEPREFIX=$HOME/.wine

# This should be fine for most users
sudo sysctl dev.i915.perf_stream_paranoid=0
"$protonfolder"/proton run "$1"

The script needs sudo privileges due to the line

sudo sysctl dev.i915.perf_stream_paranoid=0

which improves performances. If you remove this line, the script will run without sudo privileges.

Solution 2:

You may not want to hear this but if you enjoy a lot of Windows-only software and need it to perform as well as it would on Windows then dual-booting - having an actual bare-metal Windows installation - is the best way to achieve this.

Any kind of emulation layer, and Wine is an emulation layer despite what people say the name stands for these days, has the potential to degrade performance.

In particular, DirectX is a big and complicated beast and providing an entire emulating API for it adds a huge amount of weight, so any 3D game is going to suffer greatly under Wine. Subroutines that are hardware-accelerated in Windows may be emulated in software under Wine, or they may be hardware-accelerated but in a different, and less efficient way. The bottom line is a lot of the time you will get severely degraded performance.

Wine is a great exercise in providing API compatibility for Windows applications, and should be admired for the success it has had in doing so, but one should never expect anything to perform as it would in Windows itself.

Note: some decent games are natively available for Linux, through Steam or otherwise, and should run well enough on Linux. What won't run as well are games released exclusively for Windows, particularly if they use DirectX which will be the heavier, slower emulation on Wine.