Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallium Nine issues #2

Open
popsUlfr opened this issue Dec 21, 2018 · 25 comments
Open

Gallium Nine issues #2

popsUlfr opened this issue Dec 21, 2018 · 25 comments
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested

Comments

@popsUlfr
Copy link
Owner

popsUlfr commented Dec 21, 2018

General thread to discuss problems running games with gallium nine on.

Make sure you have mesa installed with gallium nine enabled.

In Ubuntu, Mint use the following PPA :
https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

In the game's launch options put :
PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_USE_GALLIUM_NINE=1 %command%

This will dump scripts into /tmp/proton_<username>

Use the ./run script to launch the game or ./run winecfg to access the wine configuration.

Read through the wiki : https://github.com/popsUlfr/Proton/wiki
Especially the debugging page : https://github.com/popsUlfr/Proton/wiki/Debugging

@Mastergatto
Copy link

Mastergatto commented Dec 21, 2018

$ ./run 
Setting breakpad minidump AppID = 253230
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198025138687 [API loaded no]
CAppInfoCacheReadFromDiskThread took 2 milliseconds to initialize
CApplicationManagerPopulateThread took 19 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread)
CreateBoundSocket: ::bind couldn't find an open port between 27015 and 27015
CreateBoundSocket: ::bind couldn't find an open port between 27015 and 27015

./run: row 17: 29605 Exited               PATH="/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/bin/:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/bin:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" TERM="xterm" WINEDEBUG="-all" WINEDLLPATH="/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/lib64/wine:/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/lib/wine" LD_LIBRARY_PATH="/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/lib64:/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/lib:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_64:/usr/lib/libfakeroot:/usr/lib32:/usr/lib:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu:/home/mastergatto/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib:" WINEPREFIX="/giochi/SteamWin/steamapps/compatdata/253230/pfx/" WINEESYNC="1" SteamGameId="253230" SteamAppId="253230" WINEDLLOVERRIDES="d3d11=n;d3d10=n;d3d10core=n;d3d10_1=n;dxgi=n" STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/mastergatto/.local/share/Steam" "/home/mastergatto/.local/share/Steam/compatibilitytools.d/Proton_3.16-5_Gallium_Nine_Extras_0.1.0/dist/bin//wine" "${@:-${DEF_CMD[@]}}"

CreateBoundSocket: ::bind couldn't find an open port between 27015 and 27015

This is where the game stops and remain in that state. I had to terminate the process after a while...

@popsUlfr
Copy link
Owner Author

@Mastergatto It doesn't even get to run wine. This seems like a problem with the steam client.

@Mastergatto
Copy link

Just to be clear, without the option to turn on Gallium Nine, all games run fine like on normal Proton.

@popsUlfr
Copy link
Owner Author

@Mastergatto So just to be sure run the game again with
PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_USE_GALLIUM_NINE=0 %command%
Close the game and run it from the ./run script in the proton dump folder.
Thanks!

@Mastergatto
Copy link

$ ./run
Setting breakpad minidump AppID = 253230
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198025138687 [API loaded no]
CAppInfoCacheReadFromDiskThread took 2 milliseconds to initialize
CApplicationManagerPopulateThread took 18 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread)
CreateBoundSocket: ::bind couldn't find an open port between 27015 and 27015
CreateBoundSocket: ::bind couldn't find an open port between 27015 and 27015
Warning, Failed to load 'Class None.': Failed to find object 'Class None.'
Warning, Failed to find object 'Class None.'
Warning, Failed to load 'Class None.': Failed to find object 'Class None.'
Warning, Failed to find object 'Class None.'

The game (A Hat in Time) runs fine though.

I want to thank you for putting efforts and time in making a version of Proton with Gallium Nine patches, if you manage to fix this issue you'll make my day 👍

@archfan
Copy link

archfan commented Dec 21, 2018

Dishonored:
./run
Setting breakpad minidump AppID = 205100
Steam_SetMinidumpSteamID: Caching Steam ID: 76561197981493202 [API loaded no]
Please install DirectX 9.0c or later (see Release Notes for instructions on how to obtain it)

Dead Space

./run
  AffinityMask = 1; Initial APIC = 0; Physical ID = 0, Core ID = 0,  SMT ID = 0
  AffinityMask = 2; Initial APIC = 1; Physical ID = 0, Core ID = 0,  SMT ID = 1
  AffinityMask = 4; Initial APIC = 2; Physical ID = 0, Core ID = 0,  SMT ID = 2
  AffinityMask = 8; Initial APIC = 3; Physical ID = 0, Core ID = 0,  SMT ID = 3
  AffinityMask = 16; Initial APIC = 4; Physical ID = 0, Core ID = 0,  SMT ID = 4
  AffinityMask = 32; Initial APIC = 5; Physical ID = 0, Core ID = 0,  SMT ID = 5
  AffinityMask = 64; Initial APIC = 6; Physical ID = 0, Core ID = 0,  SMT ID = 6
  AffinityMask = 128; Initial APIC = 7; Physical ID = 0, Core ID = 0,  SMT ID = 7
  AffinityMask = 256; Initial APIC = 8; Physical ID = 0, Core ID = 0,  SMT ID = 8
  AffinityMask = 512; Initial APIC = 9; Physical ID = 0, Core ID = 0,  SMT ID = 9
  AffinityMask = 1024; Initial APIC = 10; Physical ID = 0, Core ID = 0,  SMT ID = 10
  AffinityMask = 2048; Initial APIC = 11; Physical ID = 0, Core ID = 0,  SMT ID = 11
  AffinityMask = 4096; Initial APIC = 12; Physical ID = 0, Core ID = 0,  SMT ID = 12
  AffinityMask = 8192; Initial APIC = 13; Physical ID = 0, Core ID = 0,  SMT ID = 13
  AffinityMask = 16384; Initial APIC = 14; Physical ID = 0, Core ID = 0,  SMT ID = 14
  AffinityMask = 32768; Initial APIC = 15; Physical ID = 0, Core ID = 0,  SMT ID = 15
wine: Unhandled page fault on read access to 0x00000000 at address 0x7c4a5e (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x007c4a5e).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:007c4a5e ESP:0033f858 EBP:00000000 EFLAGS:00210286(  R- --  I S - -P- )
 EAX:00000000 EBX:00000000 ECX:0033f854 EDX:ffffffff
 ESI:00f66b2c EDI:015fce20
Stack dump:
0x0033f858:  015fce20 00f66b2c 00000002 00000000
0x0033f868:  00000002 007bfc40 00000000 007bfc40
0x0033f878:  00010052 007bfc9a 015fce20 00f66b2c
0x0033f888:  00000000 0081e53c 00000054 00000001
0x0033f898:  00000000 00000000 00000320 00000258
0x0033f8a8:  00f6b7e0 0000000a 00635f34 015fce20
Backtrace:
=>0 0x007c4a5e in dead space (+0x3c4a5e) (0x00000000)
0x007c4a5e: movl        0x0(%eax),%ecx
Modules:
Module  Address                 Debug info      Name (101 modules)
PE        400000-  fc8000       Export          dead space
ELF     79daf000-7b400000       Deferred        steamclient.so
ELF     7b400000-7b7ea000       Deferred        kernel32<elf>
  \-PE  7b420000-7b7ea000       \               kernel32
ELF     7bc00000-7bd13000       Deferred        ntdll<elf>
  \-PE  7bc10000-7bd13000       \               ntdll
ELF     7c000000-7c004000       Deferred        <wine-loader>
ELF     7c5f8000-7c80d000       Deferred        lsteamclient<elf>
  \-PE  7c6b0000-7c80d000       \               lsteamclient
ELF     7c87c000-7c884000       Deferred        libxfixes.so.3
ELF     7c884000-7c890000       Deferred        libxcursor.so.1
ELF     7c890000-7c89e000       Deferred        libxrender.so.1
ELF     7c89e000-7c8b2000       Deferred        libxi.so.6
ELF     7c8bc000-7c8f3000       Deferred        uxtheme<elf>
  \-PE  7c8c0000-7c8f3000       \               uxtheme
ELF     7c8f3000-7c987000       Deferred        winex11<elf>
  \-PE  7c900000-7c987000       \               winex11
ELF     7cb25000-7cb2f000       Deferred        libuuid.so.1
ELF     7cb2f000-7cb6b000       Deferred        libexpat.so.1
ELF     7cb6b000-7cbb7000       Deferred        libfontconfig.so.1
ELF     7cbb7000-7cc2f000       Deferred        libpcre.so.1
ELF     7cc2f000-7cd69000       Deferred        libglib-2.0.so.0
ELF     7cd69000-7ce61000       Deferred        libharfbuzz.so.0
ELF     7ce61000-7ce7b000       Deferred        libz.so.1
ELF     7ce7b000-7cebb000       Deferred        libpng16.so.16
ELF     7cebb000-7cf8b000       Deferred        libfreetype.so.6
ELF     7cf8e000-7cf92000       Deferred        libxcomposite.so.1
ELF     7cf92000-7cf99000       Deferred        libxxf86vm.so.1
ELF     7cf99000-7cf9e000       Deferred        libxinerama.so.1
ELF     7cfcc000-7cff6000       Deferred        iphlpapi<elf>
  \-PE  7cfd0000-7cff6000       \               iphlpapi
ELF     7cff6000-7d027000       Deferred        netapi32<elf>
  \-PE  7d000000-7d027000       \               netapi32
ELF     7d027000-7d052000       Deferred        msacm32<elf>
  \-PE  7d030000-7d052000       \               msacm32
ELF     7d052000-7d10a000       Deferred        winmm<elf>
  \-PE  7d060000-7d10a000       \               winmm
ELF     7d10a000-7d144000       Deferred        ws2_32<elf>
  \-PE  7d110000-7d144000       \               ws2_32
ELF     7d144000-7d18f000       Deferred        dsound<elf>
  \-PE  7d150000-7d18f000       \               dsound
ELF     7d18f000-7d205000       Deferred        d3dcompiler_47<elf>
  \-PE  7d1a0000-7d205000       \               d3dcompiler_47
ELF     7d205000-7d2a4000       Deferred        d3dx9_38<elf>
  \-PE  7d210000-7d2a4000       \               d3dx9_38
ELF     7d2a4000-7d306000       Deferred        libgldispatch.so.0
ELF     7d306000-7d329000       Deferred        libglx.so.0
ELF     7d329000-7dce2000       Deferred        shell32<elf>
  \-PE  7d340000-7dce2000       \               shell32
ELF     7dd09000-7dd1b000       Deferred        libbz2.so.1.0
ELF     7dd1b000-7dd22000       Deferred        libxdmcp.so.6
ELF     7dd22000-7dd27000       Deferred        libxau.so.6
ELF     7dd27000-7dd3d000       Deferred        libegl.so.1
ELF     7dd3d000-7dda1000       Deferred        libgl.so.1
ELF     7dda1000-7ddb6000       Deferred        libxext.so.6
ELF     7ddb6000-7df03000       Deferred        libx11.so.6
ELF     7df03000-7df2f000       Deferred        libxcb.so.1
ELF     7df32000-7df49000       Deferred        xinput1_3<elf>
  \-PE  7df40000-7df49000       \               xinput1_3
ELF     7df49000-7df70000       Deferred        d3dxof<elf>
  \-PE  7df50000-7df70000       \               d3dxof
ELF     7df70000-7dfb6000       Deferred        usp10<elf>
  \-PE  7df80000-7dfb6000       \               usp10
ELF     7dfb6000-7e0f0000       Deferred        comctl32<elf>
  \-PE  7dfc0000-7e0f0000       \               comctl32
ELF     7e0f0000-7e251000       Deferred        libsdl2-2.0.so.0
ELF     7e252000-7e257000       Deferred        libx11-xcb.so.1
ELF     7e257000-7e261000       Deferred        libxcb-xfixes.so.0
ELF     7e261000-7e292000       Deferred        d3d9-nine<elf>
  \-PE  7e270000-7e274000       \               d3d9
ELF     7e292000-7e2e0000       Deferred        dinput8<elf>
  \-PE  7e2a0000-7e2e0000       \               dinput8
ELF     7e2e0000-7e411000       Deferred        oleaut32<elf>
  \-PE  7e300000-7e411000       \               oleaut32
ELF     7e411000-7e490000       Deferred        rpcrt4<elf>
  \-PE  7e420000-7e490000       \               rpcrt4
ELF     7e490000-7e5e8000       Deferred        ole32<elf>
  \-PE  7e4b0000-7e5e8000       \               ole32
ELF     7e5e8000-7e65e000       Deferred        shlwapi<elf>
  \-PE  7e600000-7e65e000       \               shlwapi
ELF     7e65e000-7e6d7000       Deferred        advapi32<elf>
  \-PE  7e670000-7e6d7000       \               advapi32
ELF     7e6d7000-7e804000       Deferred        gdi32<elf>
  \-PE  7e6e0000-7e804000       \               gdi32
ELF     7e804000-7ea05000       Deferred        user32<elf>
  \-PE  7e820000-7ea05000       \               user32
ELF     7eed2000-7eee7000       Deferred        libnss_files.so.2
ELF     7eee7000-7efb4000       Deferred        libm.so.6
ELF     7efb4000-7efbf000       Deferred        librt.so.1
ELF     7efc2000-7efe6000       Deferred        imm32<elf>
  \-PE  7efd0000-7efe6000       \               imm32
ELF     7efe6000-7f000000       Deferred        version<elf>
  \-PE  7eff0000-7f000000       \               version
ELF     f7ad2000-f7ad8000       Deferred        libdl.so.2
ELF     f7ad8000-f7cb5000       Deferred        libc.so.6
ELF     f7cb5000-f7cd6000       Deferred        libpthread.so.0
ELF     f7cd9000-f7ce0000       Deferred        libxcb-dri3.so.0
ELF     f7d11000-f7d16000       Deferred        libxcb-present.so.0
ELF     f7d17000-f7ece000       Export          libwine.so.1
ELF     f7ed0000-f7efa000       Deferred        ld-linux.so.2
ELF     f7efd000-f7efe000       Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) Z:\home\merkel\.local\share\Steam\steamapps\common\Dead Space\Dead Space.exe
        0000002a    0
        00000029    0
        00000009    0 <==
0000000c services.exe
        00000022    0
        0000001f    0
        0000001a    0
        00000016    0
        00000013    0
        00000012    0
        00000011    0
        0000000e    0
        0000000d    0
0000000f winedevice.exe
        00000017    0
        00000015    0
        00000014    0
        00000010    0
00000018 plugplay.exe
        0000001c    0
        0000001b    0
        00000019    0
0000001d winedevice.exe
        00000023    0
        00000021    0
        00000020    0
        0000001e    0
00000024 explorer.exe
        00000028    0
        00000027    0
        00000026    0
        00000025    0
System information:
    Wine build: wine-3.16
    Platform: i386 (WOW64)
    Version: Windows 7
    Host system: Linux
    Host version: 4.19.9-zen1-1-zen

@popsUlfr
Copy link
Owner Author

@Mastergatto Thank you very much, it's weird you didn't get to see the stacktrace ? Do you have anything set in a WINEDEBUG environment variable that would suppress the output ?

@archfan Can you confirm that a wine patched with gallium nine works on your system ?

I get the same kind of trace on my nvidia, I need to do more research using known to work wine versions patched with gallium nine.

@Mastergatto
Copy link

As far as I remember, no, I haven't done anything with WINEDEBUG, but I'll have to find why it doesn't output the stacktrace

@popsUlfr
Copy link
Owner Author

Ok, this is it it seems :

39259.559:0008:0009:err:d3d9nine:present_has_d3dadapter Failed to load '/usr/local/lib/d3d/d3dadapter9.so.1': /usr/local/lib/d3d/d3dadapter9.so.1: cannot open shared object file: No such file or directory
39259.559:0008:0009:err:d3d9nine:present_has_d3dadapter 
Native Direct3D 9 will be unavailable.
For more information visit https://wiki.ixit.cz/d3d9
39259.559:0008:0009:err:d3d9nine:d3dadapter9_new Your display driver doesn't support native D3D9 adapters.

Doing this :

cd /usr/local/lib
sudo ln -s ../../lib32/d3d

Gives

39528.429:0008:0009:err:d3d9nine:DRI3CheckExtension DRI3 extension is not present
39528.429:0008:0009:err:d3d9nine:present_has_d3dadapter Unable to query DRI3. Trying DRI2 fallback (slower performance).
39528.466:0008:0009:err:d3d9nine:present_has_d3dadapter DRI2 fallback unsupported
39528.466:0008:0009:err:d3d9nine:present_has_d3dadapter 
Native Direct3D 9 will be unavailable.
For more information visit https://wiki.ixit.cz/d3d9
39528.466:0008:0009:err:d3d9nine:d3dadapter9_new Your display driver doesn't support native D3D9 adapters.

It looks like a library location screw up. Could you try putting the symbolic link and try to run again ?

@Mastergatto
Copy link

Mastergatto commented Dec 21, 2018

16097.443:0024:0025:err:d3d9nine:present_has_d3dadapter Failed to load '/usr/local/lib/d3d/d3dadapter9.so.1': /usr/local/lib/d3d/d3dadapter9.so.1: wrong ELF class: ELFCLASS32
16097.443:0024:0025:err:d3d9nine:present_has_d3dadapter �[1;31m
Native Direct3D 9 will be unavailable.
For more information visit https://wiki.ixit.cz/d3d9�[0m
16097.443:0024:0025:err:d3d9nine:d3dadapter9_new Your display driver doesn't support native D3D9 adapters.

A Hat in Time is 64-bit. But with other games like Dragon Age: Origins it worked!

16331.947:0031:0033:fixme:d3d9nine:d3dadapter9_new �[1;32m
Native Direct3D 9 is active.
For more information visit https://wiki.ixit.cz/d3d9�[0m

@popsUlfr
Copy link
Owner Author

popsUlfr commented Dec 21, 2018

@Mastergatto Cool! The modulepath for the d3dadapter9 can be set via registry
It looks at HKEY_CURRENT_USER\Software\Wine\Direct3DNine > ModulePath

For 64bit games try to set the modulepath instead of /usr/lib32/d3d/d3dadapter9.so.1 to /usr/lib/d3d/d3dadapter9.so.1 and retry A Hat in Time.

So depending on the arch it needs to be set to the corresponding 32bit or 64bit d3dadapter9.so.1
You can apply the following patch to your proton path -p1 -i modulepath.patch as a temporary workaround.

Yeah no problem you can specify for both arch using : haha

You can apply the following patch to your proton patch -p1 -i modulepath.patch .

diff -urN a/proton b/proton
--- a/proton	2018-12-16 14:31:40.000000000 +0100
+++ b/proton	2018-12-21 23:17:49.012501303 +0100
@@ -423,6 +423,7 @@
 check_environment("PROTON_USE_GALLIUM_NINE", "galliumnine")
 if "galliumnine" in config_opts:
     run_wine([wine_path, "reg", "add", "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", "/v", "d3d9", "/d", "d3d9-nine.dll", "/f"])
+    run_wine([wine_path, "reg", "add", "HKEY_CURRENT_USER\\Software\\Wine\\Direct3DNine", "/v", "ModulePath", "/d", "/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1", "/f"])
 else:
     run_wine([wine_path, "reg", "delete", "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", "/v", "d3d9", "/f"])

What would be the best way to determine the location of the d3dadapter9.so.1 ? Different distros can drop this in different paths, via pkg-config ?

So basically since this was compiled with the steam-runtime, it's no multilib. It will compile wine 64 using the 64bit docker image and wine 32 with the 32bit docker image. So by default the location of the d3dadapter9.so.1 will be hardcoded to /usr/local/lib/d3d/d3dadapter9.so.1 for both libraries.

I can just use the arch determination in the proton script and use as hint to find the right d3dadapter9.so.1 location.
But there may arise a problem if for instance there's a launcher that is 32bit which launches the real game which is 64bit.

I'll put ModulePath => /usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1 by default and otherwise let it be adjustable using an environment variable

PROTON_GALLIUM_NINE_MODULEPATH="/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1"

@rea987
Copy link

rea987 commented Dec 21, 2018

Also, #2 (comment) indicates lack of DRI3. According to following PPA, DRI3 needs to specified in xorg.conf. I will try to test that tomorrow on an AMD laptop.

https://launchpad.net/~commendsarnex/+archive/ubuntu/winedri3

@popsUlfr
Copy link
Owner Author

Ok, hotfixed version available for testing : https://github.com/popsUlfr/Proton/releases/tag/proton-3.16-5-gne-0.1.1

Thank you all :)

@Mastergatto
Copy link

Mastergatto commented Dec 21, 2018

Thank you very much for this, nice job! 👍

(Meanwhile, Proton 3.16-6 has been released now, bad timing)

@popsUlfr
Copy link
Owner Author

@Mastergatto Ah yes I just saw that. There's some very cool stuff in that release
PROTON_FORCE_LARGE_ADDRESS_AWARE :O nice!

I'll definitely update, and if I get some more feedback about how gallium nine runs for users I'll consider submitting a pull request.
There's still that mesa stuff that is a bit sketchy right now, the steam-runtime has mesa 8 while gallium nine was introduced in 10.4. That's why it needs the newer mesa to be compiled inside the runtime.
But I guess Valve can figure something out like updating their repos if gallium nine interests them.

@rea987
Copy link

rea987 commented Dec 23, 2018

Doesn't function on old hardware

Greetings,

I am not sure whether I should submit separate issues for following. As I promised, I fetched an old AMD GPU laptop to test this fork of Proton.

Specs:

OS: Mint 19.1 Mate
Kernel: 4.15.0-43-generic x86_64
CPU: Intel Core 2 Duo CPU T6600
GPU: ATI Radeon HD 4650 (Mesa 19.0: https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers/ )
RAM: 8 GB

Warhammer 40,000: Dawn of War - Dark Crusade (officially whitelisted 32 bit Direct3D 9 game)
https://store.steampowered.com/app/4580/Warhammer_40000_Dawn_of_War__Dark_Crusade/
https://www.protondb.com/app/4580

When I tried to launch the game for the first time with PROTON_USE_GALLIUM_NINE=1 %command% launch parameter, it showed following warning:

ekran goruntusu 2018-12-23 11-04-05

When I clicked OK, it showed me configuration window with no option:

ekran goruntusu 2018-12-23 11-04-29

Then I deleted the launch parameter to relaunch the game via WINED3D, the game launched properly without Gallium Nine. Then I quit the game, re-enter the launch parameter, attempted to launch the game; I got a different warning and couldn't launch the game again:

ekran goruntusu 2018-12-23 11-09-10

Log:
https://gist.github.com/rea987/454e9c064448981920fd28808bf42fc4

Dear Esther (original version; 32 bit Direct3D 9 game, Source Engine)
https://www.humblebundle.com/widget/v2/standalone/dearesther (Steam store page of the title sells Unity remake)
https://www.protondb.com/app/203810

Doesn't launch. It launches and plays properly if the launch argument is deleted.

Log:
https://gist.github.com/rea987/47b177ec990a1d20147fac8fb4b3aa96

Path of Exile (F2P game, DirectX 9 and DirectX 9 EX version are 32 bit, DirectX 11 version supports 64 bit)
https://store.steampowered.com/app/238960/Path_of_Exile/
https://www.protondb.com/app/238960

When I tried to launch the game for the first time with PROTON_USE_GALLIUM_NINE=1 %command% launch parameter, the game showed series of lack of Direct3D 11 warnings then fell back to DirectX 9 EX, finally failed to launch. Then I removed parameter to launch the game without Gallium Nine, the game properly launched, so I switched from DirectX 9 EX to DirectX 9 and quit. Re-added launch parameter, the game couldn't launch again.

Log:
https://gist.github.com/rea987/374d6f5bed64af013f05f22d9b8f6e90

Also, Deus Ex with enhanced Direct3D 9 renderer launched and played with Gallium Nine only once, later attempts failed. But as that is an unofficial custom renderer and there exist another custom OpenGL renderer from the same dev that works just fine, I don't mind at all.

https://www.cwdohnal.com/utglr/

As this is a fairly old laptop, I am not sure if it is meant to run Gallium Nine. To make sure, I will later attempt to run those games directly with "Wine + Gallium Nine" build;

https://launchpad.net/~commendsarnex/+archive/ubuntu/winedri3

@andy-d1969
Copy link

On Ubuntu 18.04 I had to set:
PROTON_GALLIUM_NINE_MODULEPATH="/usr/lib/i386-linux-gnu/d3d/d3dadapter9.so.1:/usr/lib/x86_64-linux-gnu/d3d/d3dadapter9.so.1" PROTON_USE_GALLIUM_NINE=1 %command%
Then it worked fine with the game "Remember Me". Without setting the path I got an error message saying "Please install DirectX 9.0c or later (see Release Notes for instructions on how to obtain it)"

@rea987
Copy link

rea987 commented Dec 23, 2018

#2 (comment)

Yes, yes! Thank you @andy-d1969! Changing Gallium Nine module path solved the problem. DoW:DC, Dear Esther, PoE and Deus Ex with enhanced Direct3D 9 renderer launch just fine. Here are libd3dadapter9 file locations on Mint 19.1 and most probably on Ubuntu 18.04:

libd3dadapter9-mesa

/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/d3d
/usr/lib/x86_64-linux-gnu/d3d/d3dadapter9.so
/usr/lib/x86_64-linux-gnu/d3d/d3dadapter9.so.1
/usr/lib/x86_64-linux-gnu/d3d/d3dadapter9.so.1.0.0
/usr/share
/usr/share/bug
/usr/share/bug/libd3dadapter9-mesa
/usr/share/bug/libd3dadapter9-mesa/control
/usr/share/bug/libd3dadapter9-mesa/script
/usr/share/doc
/usr/share/doc/libd3dadapter9-mesa
/usr/share/doc/libd3dadapter9-mesa/changelog.gz
/usr/share/doc/libd3dadapter9-mesa/copyright

libd3dadapter9-mesa:i386

/.
/usr
/usr/lib
/usr/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu/d3d
/usr/lib/i386-linux-gnu/d3d/d3dadapter9.so
/usr/lib/i386-linux-gnu/d3d/d3dadapter9.so.1
/usr/lib/i386-linux-gnu/d3d/d3dadapter9.so.1.0.0
/usr/share
/usr/share/bug
/usr/share/bug/libd3dadapter9-mesa
/usr/share/bug/libd3dadapter9-mesa/control
/usr/share/bug/libd3dadapter9-mesa/script
/usr/share/doc
/usr/share/doc/libd3dadapter9-mesa
/usr/share/doc/libd3dadapter9-mesa/changelog.gz
/usr/share/doc/libd3dadapter9-mesa/copyright

By the way, Steam Overlay does not work with DoW:DC and Dear Esther when Gallium Nine is active. Interestingly enough, when Gallium Nine isn't active, Steam Overlay works with those titles. However, Steam overlay does work with Deus Ex and PoE regardless of Gallium Nine is active or not. Here are logs:

DoW:DC
https://gist.github.com/rea987/55b525e46675ba0d9fbc135d300de79e

Dear Esther:
https://gist.github.com/rea987/ec69ea7c6ac1a14fa9218855d62a4834

Lastly, following is my Steam Library. Does anyone knows a 64 bit Direct3D 9 game that doesn't have a Linux version in that list, so I can test it? Sure, there might be some Linux games that happens to be also 64 bit Direct3D 9, but I don't want to deal with /tmp/proton_$USER/run for external games at this point.

https://steamcommunity.com/id/realtunya/games/?tab=all&sort=name

Edit: F2P Direct3D 9/11 game Smite seems to support optional 64 bit client.

https://pcgamingwiki.com/wiki/Smite#API
http://hirezstudios.force.com/support/articles/en_US/Knowledge/How-do-I-run-SMITE-as-64-bit

Edit 2: Smite doesn't function with Proton or Wine due to Easy Anti-Cheat software. There goes my 18 GB download...
https://www.protondb.com/app/386360

@rea987
Copy link

rea987 commented Dec 24, 2018

Dungeon Defenders II (F2P 64 bit Direct3D 9 game)
https://store.steampowered.com/app/236110/Dungeon_Defenders_II/
https://www.protondb.com/app/236110

The game doesn't work out of box because of lack of dependencies. When the game is launched, a launcher shows up;

ekran goruntusu 2018-12-25 01-12-44

When PLAY button is clicked, instead of launching the game, following error window appears:

ekran goruntusu 2018-12-24 22-02-47

This happens with Proton 3.16-5 Gallium Nine Extras 0.1.1 regardless of Gallium Nine. When, I switch to Proton 3.16-6 Beta, the game installs 5 dependencies. After digging a lot, it turned out that those are Microsoft Visual C++ 2008 x86, x68; Microsoft Visual C++ 2013 x86, x64 and DirectX End-User Runtimes (June 2010). Those dependencies are stored in .../steamapps/common/Dungeon Defenders 2/_CommonRedist directory but "Proton 3.16-5 Gallium Nine Extras 0.1.1" doesn't install them. Shockingly enough, Winetricks is unable to install required dependencies properly even in 64 bit mode. So I needed to install them manually with wine64. Here are the steps I followed after switching back to "Proton 3.16-5 Gallium Nine Extras 0.1.1";

$ sudo apt install wine64
$ cd ~/.local/share/Steam/steamapps/compatdata/236110
$ WINEPREFIX=$PWD/pfx WINEARCH=win64 wine64 "/home/r/.local/share/Steam/steamapps/common/Dungeon Defenders 2/_CommonRedist/vcredist/2008/vcredist_x86.exe"
$ WINEPREFIX=$PWD/pfx WINEARCH=win64 wine64 "/home/r/.local/share/Steam/steamapps/common/Dungeon Defenders 2/_CommonRedist/vcredist/2008/vcredist_x64.exe"
$ WINEPREFIX=$PWD/pfx WINEARCH=win64 wine64 "/home/r/.local/share/Steam/steamapps/common/Dungeon Defenders 2/_CommonRedist/vcredist/2013/vcredist_x86.exe"
$ WINEPREFIX=$PWD/pfx WINEARCH=win64 wine64 "/home/r/.local/share/Steam/steamapps/common/Dungeon Defenders 2/_CommonRedist/vcredist/2013/vcredist_x64.exe"
$ WINEPREFIX=$PWD/pfx WINEARCH=win64 wine64 "/home/r/.local/share/Steam/steamapps/common/Dungeon Defenders 2/_CommonRedist/DirectX/Jun2010/DXSETUP.exe"

After completing these steps, the game properly launched and played. I would argue, dependency installation issue has to be investigated. Finally I can confirm that Proton with Gallium Nine patches does run 64 bit Direct3D 9 games.

Edit: Just like DoW:DC and Dear Esther, Steam Overlay doesn't work with DD2 when Gallium Nine active.

@rea987 rea987 mentioned this issue Dec 25, 2018
2 tasks
@popsUlfr
Copy link
Owner Author

@rea987 I'm not sure it is possible for the Steam overlay to work since it only has OpenGL and Vulkan version. Yet Gallium Nine exposes native d3d9 where api calls do not go through OpenGL or Vulkan.

About your errors on launch I had something similar happen to me with Dark Souls where even wined3d would just crash the game immediately.
I removed the prefix inside steamapps/compatdata/, switched to another proton version > restart Steam > switch to the gallium proton > restart Steam. I don't know if this is related to your problem with Dungeon Defenders but it got Dark Souls running again for me. Steam didn't properly update the prefix it seems.

@popsUlfr popsUlfr added bug Something isn't working good first issue Good for newcomers question Further information is requested labels Dec 26, 2018
@popsUlfr
Copy link
Owner Author

New release with Proton 3.16-6 : https://github.com/popsUlfr/Proton/releases/tag/proton-3.16-6-gne-0.1.1

@axeldavy
Copy link

@rea987: "ATI Radeon HD 4650" this card should be supported by gallium nine.
I'm not sure how to explain your issues, more debug info would be appreciated (try launch with a wine version with nine without proton ?)

Just like DoW:DC and Dear Esther, Steam Overlay doesn't work with DD2 when Gallium Nine active.

Surprising, this should work. At least Steam Overlay works for me with nine (but I haven't tried Proton).

39528.429:0008:0009:err:d3d9nine:DRI3CheckExtension DRI3 extension is not present
39528.429:0008:0009:err:d3d9nine:present_has_d3dadapter Unable to query DRI3. Trying DRI2 fallback (slower performance).
39528.466:0008:0009:err:d3d9nine:present_has_d3dadapter DRI2 fallback unsupported

Surprised to see some ddx still opt for DRI2, and that the DRI2 fallback requirements are not met... what configuration was it ?

A small note for people having memory issues (or related mysterious crashes) with nine, but not without it: Some 32bits games really need a lot of virtual address space, and nine is more sensitive, as the libs are mapped into address space, and the wine d3d libs are loaded as well (thus more space taken than without). Forcing large address aware can help. Or disabling d3d11 (fewer libs loaded). Plus there are tricks to reduce pulseaudio virtual space usage. And mesa also is not releasing virtual space when it should for some textures, there is a patch on the mailing list so, it should be better in future releases.

@rea987
Copy link

rea987 commented Dec 27, 2018

@axeldavy

I solved the issue, my problem was related with PROTON_GALLIUM_NINE_MODULEPATH.

Steam Overlay should work if you use Steam for Windows via Nine, because Steam Overlay that use Direct3D 9 is renderer via Nine in that case. But, if you use Proton with Nine patches, Steam Overlay shouldn't work at this point, since Steam Overlay for Linux is renderer by OpenGL which isn't provided by Nine. In fact, I use that defect to make sure if Nine is active or not.

Adding PROTON_NO_D3D11=1 is a logical step for Nine user as far as I understand.

@logan001
Copy link

I'm on Mint 19.1 Mate
Ryzan + 970 GTX
wine staging 4.4 installed
steam installed
nothing else installed
where do i get d3dadapter9.so.1?
what configurations do i need for mint? (ubuntu 18.04)

echo PROTON_GALLIUM_NINE_MODULEPATH="$(find /usr ( -type f -o -type l ) -name d3dadapter9.so.1 -exec sh -c 'file -L "{}" | grep -q "ELF 32-bit"' ; -print -quit 2>/dev/null):$(find /usr ( -type f -o -type l ) -name d3dadapter9.so.1 -exec sh -c 'file -L "{}" | grep -q "ELF 64-bit"' ; -print -quit 2>/dev/null)"
PROTON_GALLIUM_NINE_MODULEPATH=":"

@rea987
Copy link

rea987 commented Mar 20, 2019

@logan001 https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

I suggest using Ubuntu 18.10 to get d3dadapter9 from default repos.

popsUlfr pushed a commit that referenced this issue Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants