Monday, December 21, 2015

Wine tweaks for better fps on Ubuntu

In this tutorial we will be editing Wine to improve fps when gaming . Before you proceed make sure that your CPU Governor is set to performance .This can be done via :

1. Terminal 
 # cpupower frequency-set -g governor (where "governor" represents the setting - performance,ondemand,powersave)
To adjust for only a single CPU core, append -c core_number to the command above.

2. tlp 
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
(reboot required)

 sudo apt-get install cpufrequtils
 sudo apt-get install indicator-cpufreq
(reboot required)

If you are using proprietary drivers for your GPU make sure they are up to date .

Note: when using open-source drivers for your AMD GPU make sure it is configured for maximum performance as mentioned here . This can also be achieved if you have tlp installed with radeon.dpm=1.

sudo gedit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"

sudo update-grub

Once you have completed the steps above open a terminal (ctrl+alt+t) and install Wine :

sudo add-apt-repository ppa:ricotz/unstable
sudo apt-get update
sudo apt-get install wine1.8 winetricks

To install the latest development verision use these commands instead :

sudo dpkg --add-architecture i386  (If your system is 64 bit, enable 32 bit architecture)

sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel

After Wine is done installing  open winecfg by typing it into your terminal :



Add the application (game launcher) 


Once added select it and set the Windows version to Windows XP


Adjust Audio device's



1. Open a terminal (ctrl+alt+t) and type in regedit and hit enter

2. Open the tree on the left to the section where you need to add it , in this case HKEY_CURRENT_USER\Software\Wine

3. Create a key with the name Direct3D

4. Now go to the Direct3D key you have just made and make string values by right clicking and doing New > String Value (ex. create a string named, ‘VideoMemorySize’ and then double click on it and enter the amount of memory  your video card contains with integers only, do not enter MB) :  


DirectDrawRenderer = opengl

UseGLSL = disabled (when using Nvidia card , enabled when using AMD video card)

VideoMemeorySize = 1024 




All the games installed that support OpenGL will benefit from this configuration .
Optionally you can try opening a game using the following command  :

wine ~/.wine/drive_c/Program*/Game folder/"Game.exe" -opengl

Where "Game folder" represents the folder where the game is installed and  "Game.exe" is the executable , located within the folder of the game you are trying to launch .
For more registry editing tips, go to the Useful Registry Keys section on Wine's official website.

This tutorial is meant for educational purposes only . I do not take responsibility for any damage that occurs during this process .