You are not logged in.

#1 2015-01-26 16:48:30

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Hi guys,

I've been trying the past weeks to have a working Wine with d3dadapter backend working with my Intel + Radeon hardware.
Finally after troubleshooting some issues on #d3d9 I've managed to have it working.

Requirements

1) Working DRI_PRIME configuration.

2) Add mesa-git repository (https://wiki.archlinux.org/index.php/Un … s#mesa-git)

3) Replace system mesa and install git versions of ati and intel drivers:

# pacman -S mesa-git
# pacman -S xf86-video-ati-git xf86-video-intel-git

4) Make sure Xorg and graphics acceleration still works on both Intel and Radeon.

5) Install wine-d3dadapter-git from AUR

6) This is the important step: Recompile xf86-video-intel-git and enable DRI3 (--enable-dri3)
    Not needed anymore, xf86-video-intel-git from mesa-git now has DRI3 enabled out of the box.

6a) Added Feb 4: new xf86-video-intel-git versions require

Option "DRI" "3"

  to be set in Xorg.conf for DRI3 to be enable.
  Please refer to my configuration (http://pastebin.com/E6S9W7iG) if you need help to set up a working Xorg config for dual-card setups.
  Just save it as /etc/X11/xorg.conf.d/20-gpu.conf and make sure to change the BusID values to reflect your hardware

7) Run winecfg and enable Nine -- Graphics tab, check "Prefer native Direct3D 9"

8) Not necessary but fixes games not starting due to unknown GFX card errors (i.e. Insurgency):

  8a) Start regedit, go to HKEY_CURRENT_USER -> Software -> Wine -> Direct3D
  8b) Add a DWORD key "VideoPciDeviceID", value "0x0402"
  8c) Add a DWORD key "VideoPciVendorID", value "0x10de"

  Ref: http://wiki.winehq.org/UsefulRegistryKeys

9) Start Wine games with:

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

thread_submit=true is a Wine Nine flag to fix weird rendering on PRIME

10) Check the console output for a green "Native Direct 9 is active." message

11) Enjoy!


What can I expect?

Unigine Valley: native + mesa ~10fps,  wine-staging + catalyst: ~12fps, this solution: ~25fps
Insurgency: wine-staging + catalyst: 10-45fps, this solution: 30-75fps

Tested on

Archlinux x86_64, mesa-git 67611.76086d7-1, xf86-video-intel-git 8724.ed19b16-1, xf86-video-ati-git 3167.04da199-1, linux-mainline 3.19-rc3

Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M] (rev ff) -- Actually a AMD Radeon 6630M (TURKS)
Sony Vaio VPCSA

Radeon driver is using GLAMOR acceleration instead of default EXA, as suggested by the Nine developers -- EXA may work, not tested.

Hope this helps.

EDIT: added note that I'm using Glamor instead of default EXA on Radeon.
EDIT: no need to recompile DRI3 on xf86-video-intel-git anymore, it's already enabled if using mesa-git repository.
EDIT Feb 4: DRI3 needs to be enabled in Xorg.conf

Last edited by eazy (2015-02-05 04:33:46)


no masters to rule us, no gods to fool us

Offline

#2 2015-01-26 17:16:59

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 270
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

For the record, you can give my AUR package a try, since I made it recently and it's up-to-date. https://aur.archlinux.org/packages/wine-d3dadapter/
I hope it works well with your configuration.


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#3 2015-01-26 21:30:50

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@smirky: yes that may work, although I don't want to compile Wine once again smile

The HOWTO is mainly to stress the fact that you need to recompile xf86-video-intel and enable DRI3 to have it work on PRIME.

This is counter intuitive since one would expect the need to enable it on the Radeon driver, also considering that Wine Nine supposedly works with DRI2 but for some reason it actually crashes if DRI3 isn't set up.

If you tried wine-d3dadapter and you get a crash on a PRESENTPixmap function call, that's the reason. You need to enable DRI3 to the Intel driver.


no masters to rule us, no gods to fool us

Offline

#4 2015-02-01 14:11:09

rudzha
Member
Registered: 2012-06-25
Posts: 19

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

I'm trying to do this with Nouveau and EVE Online, crashes right after character selection.
No idea how to tell if it's an issue with Nouveau, EVE or just me failing at setting this thing up.

Offline

#5 2015-02-02 23:16:42

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@eazy, I have identical setup but I still can't get this to work on radeon (it works on Intel, though obviously frame rate is unplayable).
Here's what I get with DRI_PRIME=1

Unhandled exception: page fault on write access to 0x00000004 in 32-bit code (0xf672c236).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:f672c236 ESP:0033edb4 EBP:00000000 EFLAGS:00210216(  R- --  I   -A-P- )
 EAX:00000000 EBX:f6b21000 ECX:f6b1f840 EDX:00000000
 ESI:7d0847f8 EDI:00000000
Stack dump:
0x0033edb4:  00000000 000000ac f672c1de f6b21000
0x0033edc4:  8876086c 7d0847f8 f67a3ec8 7d0847f8
0x0033edd4:  7d0847f8 00000000 f67a3e7c f6b21000
0x0033ede4:  8876086c 7d0847f8 f67a4403 7d0847f8
0x0033edf4:  000000ac 00000001 00000003 00000000
0x0033ee04:  00000000 0033ee58 00000016 00000000
000c: sel=0067 base=00000000 limit=00000000 16-bit --x
Backtrace:
=>0 0xf672c236 in d3dadapter9.so.1 (+0x117236) (0x00000000)
  1 0xf67a3ec8 in d3dadapter9.so.1 (+0x18eec7) (0x00000000)
  2 0xf67a4403 in d3dadapter9.so.1 (+0x18f402) (0x00000000)
  3 0xf672f910 in d3dadapter9.so.1 (+0x11a90f) (0x7cecb4c8)
  4 0x0093ad33 in pathofexile (+0x53ad32) (0x00ca7034)
  5 0x00000000 (0x7d062168)
  6 0x00000001 (0xf6b23fc0)
  7 0xf6736650 in d3dadapter9.so.1 (+0x12164f) (0xf6736720)
  8 0xefba27e8 (0x53565755)
0xf672c236: movl	%edx,0x4(%eax)
Modules:
Module	Address			Debug info	Name (153 modules)
PE	  360000-  379000	Deferred        openal32
PE	  400000-  f21000	Export          pathofexile
PE	 1b80000- 1d67000	Deferred        d3dcompiler_42
PE	 3b80000- 3fd8000	Deferred        wrap_oal
PE	10000000-101e5000	Deferred        d3dx9_42
PE	66650000-666a4000	Deferred        usp10
PE	772b0000-7731c000	Deferred        riched20
PE	78050000-780b9000	Deferred        msvcp100
PE	78aa0000-78b5e000	Deferred        msvcr100
ELF	7a800000-7a91d000	Deferred        opengl32<elf>
  \-PE	7a820000-7a91d000	\               opengl32
ELF	7b800000-7ba5a000	Deferred        kernel32<elf>
  \-PE	7b810000-7ba5a000	\               kernel32
ELF	7bc00000-7bce1000	Deferred        ntdll<elf>
  \-PE	7bc10000-7bce1000	\               ntdll
ELF	7bf00000-7bf03000	Deferred        <wine-loader>
ELF	7d352000-7d3c5000	Deferred        libgmp.so.10
ELF	7d3c5000-7d3f4000	Deferred        libhogweed.so.2
ELF	7d3f4000-7d427000	Deferred        libnettle.so.4
ELF	7d427000-7d43b000	Deferred        libtasn1.so.6
ELF	7d43b000-7d49f000	Deferred        libp11-kit.so.0
ELF	7d49f000-7d4d1000	Deferred        libcrypt.so.1
ELF	7d4d1000-7d60a000	Deferred        libgnutls.so.28
ELF	7d60a000-7d687000	Deferred        libcups.so.2
ELF	7d6ce000-7d6d9000	Deferred        libxcursor.so.1
ELF	7d6d9000-7d6ec000	Deferred        libxi.so.6
ELF	7d6ec000-7d6f0000	Deferred        libxcomposite.so.1
ELF	7d6f0000-7d6fb000	Deferred        libxrandr.so.2
ELF	7d6fb000-7d706000	Deferred        libxrender.so.1
ELF	7d706000-7d70a000	Deferred        libxinerama.so.1
ELF	7d70a000-7d713000	Deferred        librt.so.1
ELF	7d713000-7d71c000	Deferred        libffi.so.6
ELF	7d71c000-7d723000	Deferred        libxdmcp.so.6
ELF	7d723000-7d727000	Deferred        libxau.so.6
ELF	7d727000-7d72d000	Deferred        libxxf86vm.so.1
ELF	7d72d000-7d730000	Deferred        libxshmfence.so.1
ELF	7d730000-7d738000	Deferred        libxcb-sync.so.1
ELF	7d738000-7d748000	Deferred        libxcb-randr.so.0
ELF	7d748000-7d763000	Deferred        libxcb-glx.so.0
ELF	7d763000-7d769000	Deferred        libxfixes.so.3
ELF	7d769000-7d76d000	Deferred        libxdamage.so.1
ELF	7d76d000-7d77c000	Deferred        libdrm.so.2
ELF	7d77c000-7d795000	Deferred        libglapi.so.0
ELF	7d795000-7d7a6000	Deferred        libwayland-server.so.0
ELF	7d7a6000-7d7b3000	Deferred        libwayland-client.so.0
ELF	7d7b3000-7d7c3000	Deferred        libgbm.so.1
ELF	7d7c3000-7d7c8000	Deferred        libxcb-shape.so.0
ELF	7d7c8000-7d7d3000	Deferred        libxcb-render.so.0
ELF	7d7d3000-7d7d9000	Deferred        libxcb-dri2.so.0
ELF	7d7d9000-7d7e2000	Deferred        libxcb-xfixes.so.0
ELF	7d7e2000-7d7e5000	Deferred        libx11-xcb.so.1
ELF	7d7e5000-7d80b000	Deferred        libxcb.so.1
ELF	7d80b000-7d8b5000	Deferred        libgl.so.1
ELF	7d8b5000-7d8e3000	Deferred        libegl.so.1
ELF	7d8e3000-7da1a000	Deferred        libx11.so.6
ELF	7da1a000-7da2f000	Deferred        libxext.so.6
ELF	7da41000-7da76000	Deferred        uxtheme<elf>
  \-PE	7da50000-7da76000	\               uxtheme
ELF	7da76000-7db0f000	Deferred        winex11<elf>
  \-PE	7da80000-7db0f000	\               winex11
ELF	7dbd9000-7dc02000	Deferred        libexpat.so.1
ELF	7dc02000-7dc3e000	Deferred        libfontconfig.so.1
ELF	7dc3e000-7dc4f000	Deferred        libbz2.so.1.0
ELF	7dc4f000-7dd07000	Deferred        libfreetype.so.6
ELF	7dd09000-7dd0d000	Deferred        libxcb-present.so.0
ELF	7dd4e000-7de89000	Deferred        oleaut32<elf>
  \-PE	7dd60000-7de89000	\               oleaut32
ELF	7de89000-7deac000	Deferred        imm32<elf>
  \-PE	7de90000-7deac000	\               imm32
ELF	7deac000-7ded2000	Deferred        iphlpapi<elf>
  \-PE	7deb0000-7ded2000	\               iphlpapi
ELF	7ded2000-7df10000	Deferred        winspool<elf>
  \-PE	7dee0000-7df10000	\               winspool
ELF	7df10000-7e00e000	Deferred        comctl32<elf>
  \-PE	7df20000-7e00e000	\               comctl32
ELF	7e00e000-7e083000	Deferred        shlwapi<elf>
  \-PE	7e020000-7e083000	\               shlwapi
ELF	7e083000-7e2b1000	Deferred        shell32<elf>
  \-PE	7e090000-7e2b1000	\               shell32
ELF	7e2b1000-7e398000	Deferred        comdlg32<elf>
  \-PE	7e2c0000-7e398000	\               comdlg32
ELF	7e398000-7e3ab000	Deferred        psapi<elf>
  \-PE	7e3a0000-7e3ab000	\               psapi
ELF	7e3ab000-7e411000	Deferred        dbghelp<elf>
  \-PE	7e3b0000-7e411000	\               dbghelp
ELF	7e411000-7e490000	Deferred        rpcrt4<elf>
  \-PE	7e420000-7e490000	\               rpcrt4
ELF	7e490000-7e5c5000	Deferred        ole32<elf>
  \-PE	7e4b0000-7e5c5000	\               ole32
ELF	7e5c5000-7e67b000	Deferred        winmm<elf>
  \-PE	7e5d0000-7e67b000	\               winmm
ELF	7e67b000-7e730000	Deferred        msvcrt<elf>
  \-PE	7e690000-7e730000	\               msvcrt
ELF	7e730000-7e79e000	Deferred        advapi32<elf>
  \-PE	7e740000-7e79e000	\               advapi32
ELF	7e79e000-7e8bb000	Deferred        gdi32<elf>
  \-PE	7e7b0000-7e8bb000	\               gdi32
ELF	7e8bb000-7ea0f000	Deferred        user32<elf>
  \-PE	7e8d0000-7ea0f000	\               user32
ELF	7ea0f000-7ea26000	Deferred        libz.so.1
ELF	7ea26000-7ec3b000	Deferred        libcrypto.so.1.0.0
ELF	7ec3b000-7ecb5000	Deferred        libssl.so.1.0.0
ELF	7ecb5000-7ecce000	Deferred        libresolv.so.2
ELF	7ecce000-7ed27000	Deferred        libldap_r-2.4.so.2
ELF	7ed27000-7ed2b000	Deferred        libxcb-dri3.so.0
ELF	7ed2b000-7ed55000	Deferred        msacm32<elf>
  \-PE	7ed30000-7ed55000	\               msacm32
ELF	7ed55000-7ed6e000	Deferred        version<elf>
  \-PE	7ed60000-7ed6e000	\               version
ELF	7ed6e000-7edc8000	Deferred        wldap32<elf>
  \-PE	7ed80000-7edc8000	\               wldap32
ELF	7ef6c000-7efb9000	Deferred        libm.so.6
ELF	7efb9000-7efc9000	Deferred        liblber-2.4.so.2
ELF	7efc9000-7f000000	Deferred        ws2_32<elf>
  \-PE	7efd0000-7f000000	\               ws2_32
ELF	f447a000-f4492000	Deferred        libudev.so.1
ELF	f4492000-f449d000	Deferred        libpciaccess.so.0
ELF	f4592000-f65b5000	Deferred        libllvm-3.5.so
ELF	f65b5000-f65ce000	Deferred        libelf.so.1
ELF	f6615000-f6cf4000	Dwarf           d3dadapter9.so.1
ELF	f6cf4000-f6e2f000	Deferred        wined3d<elf>
  \-PE	f6d00000-f6e2f000	\               wined3d
ELF	f6e2f000-f6e78000	Deferred        dsound<elf>
  \-PE	f6e40000-f6e78000	\               dsound
ELF	f6e78000-f6f83000	Deferred        libasound.so.2
ELF	f6f89000-f6fca000	Deferred        d3d9<elf>
  \-PE	f6f90000-f6fca000	\               d3d9
ELF	f6fca000-f6ffa000	Deferred        winealsa<elf>
  \-PE	f6fd0000-f6ffa000	\               winealsa
ELF	f6ffa000-f7048000	Deferred        libjpeg.so.8
ELF	f7048000-f7100000	Deferred        windowscodecs<elf>
  \-PE	f7060000-f7100000	\               windowscodecs
ELF	f7200000-f7206000	Deferred        libtxc_dxtn.so
ELF	f7206000-f722b000	Deferred        libdrm_intel.so.1
ELF	f722b000-f7246000	Deferred        libgcc_s.so.1
ELF	f7246000-f724c000	Deferred        libattr.so.1
ELF	f724c000-f725b000	Deferred        libdrm_radeon.so.1
ELF	f725b000-f7263000	Deferred        libdrm_nouveau.so.2
ELF	f726b000-f728d000	Deferred        mmdevapi<elf>
  \-PE	f7270000-f728d000	\               mmdevapi
ELF	f72af000-f737e000	Deferred        crypt32<elf>
  \-PE	f72c0000-f737e000	\               crypt32
ELF	f737e000-f73c0000	Deferred        rsaenh<elf>
  \-PE	f7380000-f73c0000	\               rsaenh
ELF	f73cc000-f73d1000	Deferred        libdl.so.2
ELF	f73d2000-f73e0000	Deferred        libnss_files.so.2
ELF	f73e0000-f73e5000	Deferred        libcap.so.2
ELF	f73e5000-f73ec000	Deferred        libnss_dns.so.2
ELF	f7418000-f75d0000	Deferred        libc.so.6
ELF	f75d0000-f75ed000	Deferred        libpthread.so.0
ELF	f75ed000-f77a5000	Dwarf           libwine.so.1
ELF	f77a6000-f77c9000	Deferred        ld-linux.so.2
ELF	f77cb000-f77cc000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) C:\Program Files\Grinding Gear Games\Path of Exile\PathOfExile.exe
	0000002d   15
	0000002c   15
	00000026    0
	00000025    0
	00000024    0
	00000022    0
	00000009    0 <==
0000000e services.exe
	0000001d    0
	0000001c    0
	00000016    0
	00000014    0
	00000010    0
	0000000f    0
00000012 winedevice.exe
	0000001b    0
	00000018    0
	00000017    0
	00000013    0
00000019 plugplay.exe
	0000001f    0
	0000001e    0
	0000001a    0
00000020 explorer.exe
	00000021    0
0000002e CrashUpload.exe
	00000032    0
	0000002f    0

Notes:
I am on 3.18.5-1-ck
I did not change the default renderer to Glamor because I don't know how to do it in dual-card setup. I read that all config files should be deleted from /etc/X11/

Last edited by Lockheed (2015-02-02 23:39:16)


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#6 2015-02-03 09:33:44

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@rudzha, @lockheed: there are many factor in play. I confirm that Unigine Valley should work properly with PRIME. Perhaps you want to test it and report back.

@lockheed: As I said above, please test with Unigine.
What is strange from your backtrace is that you're hitting an exception in the d3dadapter code from Mesa, which should be unrelated to Wine.

You may want to retry with linux-mainline, which supposedly has a number of improvement on both the Intel and Radeon kernel support.

I'd had a lot of headache too to set up a working X11 configuration for dual card setups, this is what I'm using:

$ cat /etc/X11/xorg.conf.d/20-gpu.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
    Screen 1 "radeon" LeftOf "intel"
EndSection

Section "Device"
    Identifier "radeon"
    Driver "radeon"
    BusID "PCI:1:0:0"
    Screen 1

    Option "AccelMethod" "glamor"
    Option "EnablePageFlip" "on"
EndSection

Section "Device"
    Identifier "intel"
    Driver "intel"
    BusID "PCI:0:2:0"
    Screen 0
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
    Monitor "monitor"
    DefaultDepth 24
EndSection

Section "Screen"
    Identifier "radeon"
    Device "radeon"
    Monitor "monitor"
    DefaultDepth 24
EndSection

Section "Monitor"
    Identifier "monitor"
    Option "Enable" "true"
EndSection

You just have to fix the BusID values to reflect your hardware configuration.

NOTE: although the Radeon card is configured as being "left of" the intel card, I am not working with multiple screens. That's just how Xorg wants it to be set for both card to be initialized correctly.

Last edited by eazy (2015-02-03 09:36:47)


no masters to rule us, no gods to fool us

Offline

#7 2015-02-03 13:28:38

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

I installed latest linux-mainline and implemented your X11 config (I think we have exactly the same setup, because even the BusIDs were the same).

There was no change - I still get the same error when trying to run Path of Exile. However, when I run other, less demanding Wine games, like Battlefield 1942 or DiabloII, using the very same command line, they do run without errors.

A side note: I compiled and installed wine-d3dadapter-git BEFORE installing mesa-git, xf86-video-ati-git, xf86-video-intel-git. Does it make any difference?


I also run  unigine-valley, although not sure how is it suppose to verify anything as it seems to be linux native program not run under wine. Anyways:

DRI_PRIME=1 unigine-valley
runs fine. I get solid 2 FPS at 1920x1200. This is my radeon.

unigine-valley
doesn't run. This is my Intel GPU.

$ unigine-valley 
Loading "/home/juha/.Valley/valley_1.0.cfg"...
Loading "libGPUMonitor_x64.so"...
Loading "libGL.so.1"...
Loading "libopenal.so.1"...
Set 1920x1200 fullscreen video mode
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  156 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  56
  Current serial number in output stream:  55
AL lib: (EE) alc_cleanup: 1 device not closed
Loading "/home/juha/.Valley/valley_1.0.cfg"...
Loading "libGPUMonitor_x64.so"...
Loading "libGL.so.1"...
Loading "libopenal.so.1"...
Set 1920x1200 fullscreen video mode
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  156 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  56
  Current serial number in output stream:  55
AL lib: (EE) alc_cleanup: 1 device not closed

Let me summarise:

>>> Before installing patched Wine and git drivers:
- Path of Exile in wine on Intel GPU (no DRI_PRIME switch) starts fine but there is no 3D content. Only 2D menus. Everything else is black.
- Path of Exile in wine on ATI GPU (DRI_PRIME=1) starts fine but there is no 3D content. Only 2D menus. Everything else is black.

>>> After replacing standard Wine with wine-d3dadapter-gitm and installing git mesa, ati and intel drivers:
- Path of Exile in wine on Intel GPU (no DRI_PRIME switch) runs fine but has unplayable framerate
- Path of Exile in wine on ATI GPU (DRI_PRIME=1) crashes on loading screen with the error above.

Last edited by Lockheed (2015-02-03 13:33:57)


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#8 2015-02-04 00:53:22

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

If your configuration is the one in the signature, we do not have the same hardware.

OK, my suggestion was to run unigine-valley on Wine, but apparently you were trying to run the native version, which indicates further issues on your system:

1) Native Unigine Valley on Intel gives you a "GLXBadFBConfig" exception, which from a quick Google search indicates a GPU too old to support recent OpenGL versions. -- On my system it works correctly (both Radeon and Intel).

2) It seems that Path of Exile has issues independent of the Gallium Nine patch.  Gallium Nine doesn't magically fix bugs already existing on vanilla Wine, so if you have issues on vanilla, you are probably gonna have them on Nine.

3) Try Unigine Valley on Wine + Radeon + DRI_PRIME: this should work. If it does, your issues are not about Gallium Nine and have to be investigated separately.

4) Always use the "thread_submit=true" environment variable when using Wine Nine and DRI_PRIME or you're going to get rendering errors. See point #9 of my original post.

Last edited by eazy (2015-02-04 00:53:34)


no masters to rule us, no gods to fool us

Offline

#9 2015-02-04 08:51:36

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

<wrong post>

Last edited by Lockheed (2015-02-04 08:52:59)


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#10 2015-02-04 08:56:50

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Hey eazy, thanks for further clarification. Following comments:

2) The bug that was there on normal Wine, disappeared using this patched version. As I mentioned, it runs dine on Intel now, except for the low framerate. So the problem with running it on ATI must be ATI/Gallium/-related.

3) How to run unigine-valley on wine? Simply run "wine unigine-valley"? And dhould I create wine bottle to select that extra option in the winecfg graphics tab?


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#11 2015-02-04 09:09:43

helix
Member
Registered: 2013-02-17
Posts: 176

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Will this method run games on native direct3d that require older versions of direct3d, like 8, 7 or 6?

Offline

#12 2015-02-04 15:19:46

BasT
Member
Registered: 2010-08-28
Posts: 91

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Any way to get wine-d3dadapter with pulseaudio support (i.e. wine-multimedia)?

Offline

#13 2015-02-04 20:32:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

eazy wrote:

If your configuration is the one in the signature, we do not have the same hardware.

OK, my suggestion was to run unigine-valley on Wine, but apparently you were trying to run the native version, which indicates further issues on your system:

1) Native Unigine Valley on Intel gives you a "GLXBadFBConfig" exception, which from a quick Google search indicates a GPU too old to support recent OpenGL versions. -- On my system it works correctly (both Radeon and Intel).

2) It seems that Path of Exile has issues independent of the Gallium Nine patch.  Gallium Nine doesn't magically fix bugs already existing on vanilla Wine, so if you have issues on vanilla, you are probably gonna have them on Nine.

3) Try Unigine Valley on Wine + Radeon + DRI_PRIME: this should work. If it does, your issues are not about Gallium Nine and have to be investigated separately.

4) Always use the "thread_submit=true" environment variable when using Wine Nine and DRI_PRIME or you're going to get rendering errors. See point #9 of my original post.

Easy, thank you for your input. I have two following comments:

2) As mentioned, PoE had issues on regular Wine, but it no longer has those issues on this patched Wine, which is shown when run on Intel GPU. Everything works, including 3D. Just the framerate is slow. So I think the problem is the ATI driver.

3) How do I run Unigine on wine? And do I need to create a new wine bottle and set this extra DirectX option to ON in winecfg/Graphics?


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#14 2015-02-05 04:35:10

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

UPDATE: New xf86-video-intel-git version require an option in Xorg.conf to enable DRI3.
While Wine Nine supposedly works with DRI2, in my experience DX9 software either crashes or do not even start.

Please refer to step 6a for more info.

Last edited by eazy (2015-02-05 04:42:01)


no masters to rule us, no gods to fool us

Offline

#15 2015-02-05 04:41:33

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@lockheed:

1) Download the Windows version here: https://unigine.com/products/valley/download/
2) Install it

$ env WINEARCH=win32  wine Unigine_Valley-1.0.exe

3) Run it on Intel

$ cd ~/.wine/drive_c/Program Files/Unigine/Valley Benchmark 1.0/bin
$ wine browser_x86.exe -config ../data/launcher/launcher.xml

3a) Run it on Radeon

$ env DRI_PRIME=1 thread_submit=true wine browser_x86.exe -config ../data/launcher/launcher.xml

Make sure to set the API to DirectX 9 on the benchmark options.


no masters to rule us, no gods to fool us

Offline

#16 2015-02-05 04:44:15

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@helix: yes, this is a different and improved code path for DX9 -- if it works on vanilla Wine, it should work with this patched version too.
But you won't get further acceleration on anything different than DX9, I think.

@BaST: probably, you're gonna need to get your hands dirty and patch manually. I'm no Wine maintainer or expert, I haven't tried.

Last edited by eazy (2015-02-05 04:45:17)


no masters to rule us, no gods to fool us

Offline

#17 2015-02-08 04:11:35

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

BasT wrote:

Any way to get wine-d3dadapter with pulseaudio support (i.e. wine-multimedia)?

just get the pkg from aur add the patches to wine-multimedia and build it.


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#18 2015-02-21 11:24:26

haagch
Member
Registered: 2013-08-17
Posts: 209

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

I use a very similar setup and was searching all over the place why dri3 wasn't "working" anymore until I found your post and saw that they changed the default dri level to 2. Thanks.

The xorg snippet doesn't need to be so long. /etc/X11/xorg.conf.d/20-intel.conf with

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "DRI"  "3"
EndSection

is enough to enable dri 3. Compiling xf86-video-intel with --with-default-dri=3 works too and then no xorg config is needed.

Last edited by haagch (2015-02-21 11:25:22)

Offline

#19 2015-02-21 17:44:42

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

@eazy, I did the test with Unigine Valley on wine.

On Intel:
It starts fine and I get solid 0,5FPS, however, everything is tinted green.


On Radeon, I click RUN in the Benchmark window, the screen goes black, and then wine Program Error shows up. I click "Details" but it gets stuck on

Loading detailed information. Please wait...

and never loads any more error information. I waited about 3 minutes. The benchmark config window remains open, though.

This is the terminal output:

$ env WINEPREFIX="/home/juha/.wine-bottles/uv" DRI_PRIME=1 thread_submit=true wine browser_x86.exe -config ../data/launcher/launcher.xml
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
fixme:system:SetProcessDPIAware stub!
fixme:win:RegisterTouchWindow (0x10062 00000000): stub
fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
fixme:imm:NotifyIME IMC_SETCANDIDATEPOS
fixme:imm:ImmReleaseContext (0x10062, 0x141780): stub
fixme:win:FlashWindowEx 0x33f2d8
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
fixme:wbemprox:client_security_SetBlanket 0x7dad7a10, 0x12fdd0, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0x7dad7a10
fixme:win:EnumDisplayDevicesW ((null),0,0x33e1a8,0x00000000), stub!
fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored
fixme:thread:SetThreadIdealProcessor (0xfffffffe): stub
fixme:win:EnumDisplayDevicesW ((null),0,0x33e878,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x33e878,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x33e878,0x00000000), stub!
err:x11drv:DRI3CheckExtension DRI3 extension is not present
err:d3dadapter:has_d3dadapter Unable to query DRI3. Trying DRI2 fallback (slower performance).
fixme:win:EnumDisplayDevicesW ((null),0,0x33e6a8,0x00000000), stub!
ATTENTION: default value of option thread_submit overridden by environment.
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x33e6a8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x33e6a8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x33e6a8,0x00000000), stub!
fixme:d3d9:d3dadapter9_new 
Native Direct3D 9 is active.
For more information visit https://wiki.ixit.cz/d3d9
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x33e658,0x00000000), stub!
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x139640), stub!
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x139640), stub!
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
wine: Unhandled page fault on read access to 0x00000000 at address 0x7df29ad1 (thread 003c), starting debugger...
fixme:imm:NotifyIME IMC_SETCANDIDATEPOS
fixme:win:FlashWindowEx 0x33d398

Now, if I disable "Prefer native Direct3D 9" option in winecfg, I get a bit further. I get to see the loading screen, but then it crashes with another error:

can't initialize GPUMonitorEnginePlugins...
Direct 3D9 error: invalid call... 

but I suppose this is normal.


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#20 2015-03-05 10:39:44

Lockheed
Member
Registered: 2010-03-16
Posts: 1,463

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

The problem persists on latest wine-staging and mesa-git drivers.


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#21 2015-03-31 04:09:06

diego7319
Member
Registered: 2015-03-29
Posts: 6

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

:: gcc-multilib and gcc are in conflict. ¿delete gcc? [s/N] S
:: gcc-libs-multilib and gcc-libs are in conflict. ¿delete gcc-libs? [s/N] S
i jsut did this i hope its ok

Offline

#22 2015-03-31 07:26:52

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 270
Website

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Weird output, but yes, replacing with multilib is ok.


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#23 2015-03-31 16:25:33

helix
Member
Registered: 2013-02-17
Posts: 176

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

Is it still necessary to use the git versions of mesa/xf86-video-intel/xf86-video-ati to make this work?

Offline

#24 2015-03-31 19:41:15

diego7319
Member
Registered: 2015-03-29
Posts: 6

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

5) Install wine-d3dadapter-git from AUR couldnt install after half hour of compiling , was something about dri3 i thing, i have an apu+6470m

Offline

#25 2015-04-01 01:05:15

diego7319
Member
Registered: 2015-03-29
Posts: 6

Re: HOWTO: Wine + Gallium Nine and PRIME (Intel+Radeon)

smirky wrote:

Weird output, but yes, replacing with multilib is ok.

i got an error installing ur pkg, sign error
wine-1.7.38.tar.bz2 ... Aprobado(approved)
    wine-1.7.38.tar.bz2.sign ... Omitido(not approved)
    30-win32-aliases.conf ... Aprobado(approved)
    d3d9.patch ... Aprobado(approved)
==> Verificando las firmas de las fuentes con gpg...
    wine-1.7.38.tar.bz2 ... hsa failed (unkown public key F5E6E9EEB9461DD7)

Last edited by diego7319 (2015-04-01 01:13:27)

Offline

Board footer

Powered by FluxBB