Tutorial on Wine: Gallium 9, possibly doubling your framerate

Wine is a great system to running programs, but there are many alternatives in Linux. The biggest thing people use wine for is games and the most common complain about games running under the WINE compatibility layer is performance. Naturally, most people would default to the propriety drivers to try to optimise performance, which has been the case for a long time until…

Gallium Nine, demonstrating increased performance for Direct3D 9. 

To install

Install the mesa OIBAF PPA and Patched gallium wine PPA

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo add-apt-repository ppa:oibaf/gallium-nine
sudo add-apt-repository ppa:commendsarnex/winedri3 
sudo apt-get update
sudo apt-get upgrade && sudo apt-get install wine1.9

Enable

sudo apt-get install mesa-vdpau-drivers

You will need to specify to use open source drivers.

driver

Edit Registry in Wine

Fortunately this can be done on a GUI. Run winecfg Select the Graphics tab In the 3D Acceleration group select “Prefer native Direct3D 9”

D3D9

As shown, this can be done on PlayOnLinux by setting the version of wine to System.

The option will not appear if your version of wine is not patched.

Recommendations

I would recommend that those using ATI/Intel drivers consider using the Gallium 3D drivers as the open source drivers are often more stable than the propriety options. As for NVIDIA cards, I recommend weighing the benefits before making the switch. Not having the latest NVIDIA propriety drivers may conflict with some games on Steam.

Update: Rendering Issue Fixes

You may have to add the following parameter which may fix some rendering issues:

thread_submit=true

So the command should look like

env WINEARCH=win32 DRI_PRIME=1 thread_submit=true wine program.exe

or on PlayOnLinux:

DRI_PRIME=1 thread_submit=true PlayOnLinux --run "filename"
(single program, you may create a shortcut for that matter)

or in the POL Console

POL_Config_Write BEFORE_WINE 'DRI_PRIME=1 thread_submit=true'
(affects all POL programs)

To uninstall PPAs

sudo apt-get install ppa-purge
sudo ppa-purge ppa:oibaf/graphics-drivers
sudo ppa-purge ppa:oibaf/gallium-nine
sudo ppa-purge ppa:commendsarnex/winedri3

Edit: Code modified to reflect version 1.9 for WINE. Thanks sarnex.

Advertisements
This entry was posted in Crossover, Tutorials and tagged , , , , , , , . Bookmark the permalink.

6 Responses to Tutorial on Wine: Gallium 9, possibly doubling your framerate

  1. Eduard says:

    Tried it and for some reason apps would randomly render correctly or black (easy to test repeatedly executing glxgears). This issue disappeared after switching to Xrender in kde compositing. Still, when trying to use the Gallium Nine enabled wine the performance was really poor compared to regular wine with the propietary drivers. It may be because I have an Optimus laptop.

  2. Cfuzz says:

    @P-Meister
    You are entirely right it may be game-specific, I did my tests on Rift and I did use the nouveau driver, checking with glxinfo that the environment variable DRI_PRIME set to 1 did actually enable it. I will try your proposed solution for the rendering glitches and see how it performs switching back composition to opengl.
    Question: is it possible to enable the Nvidia card by default without having to set the DRI_PRIME variable each time for each app? Afaik I could only do that with the propietary driver and nvidia-prime.

  3. げっそり says:

    I am regular reader, how are you everybody? This paragraph posted at this web site is really
    nice.

  4. 86Iola says:

    I have noticed you don’t monetize your website, don’t waste your traffic, you can earn extra cash
    every month because you’ve got high quality content. If
    you want to know how to make extra $$$, search for: best adsense alternative
    Wrastain’s tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s