valarnin/ffxiv-tools

Several issues when trying to get this work

Closed this issue · 10 comments

Hey there,

first: thank you for all your efforts, trying to make ACT run on Linux.

I stumbled upon several problems when using ffxiv-tools:

  • I'm on Pop!_OS 20.04 (respective Ubuntu 20.04) and am not able to satisfy all the requirements shown by setup.sh: e.g. libpng12.so.0 is outdated for years now and has been replaced by libpng16 so far. With a little tinker it's still possible to get a x64 build of it - but no 32 bit afaik.
  • I tried to run it anyway because I could still continue without meeting all the requirements (when running setup.sh I get "if [[ not found" or something similar).
  • It then tinkered with (destroyed) my Proton-5.9-GE-ST build (yes, I know: it's not supposed to work with this version). After this, winetricks was unable to install any dotnet version because "libgcrypt not found" and something with "diffy helman key exchange" not working.
  • I still let it do its stuff. In the end, I at least got my ffxiv-*.sh files in ~/bin/.
  • I could even run ACT. But it had network issues (couldn't download any plugin and threw an error regarding network issues).
  • I reverted my Proton prefix (thank god, it did a backup beforehand). Installed all the dotnet stuff manually (protontricks). No issues (so I guess, it's been the tinkering with the Proton prefix).
  • Now I could run FFXIV and ACT without issues... I thought. ACT still cannot connect to the FFXIV process using network (memory works though).
  • I added my user to the netdev group and then did the setcap stuff like ffxiv-tools does:
    sudo setcap cap_net_raw,cap_net_admin,cap_sys_ptrace=eip /home/realtehreal/.steam/root/compatibilitytools.d/Proton-5.9-GE-8-ST/dist/bin/wine
    sudo setcap cap_net_raw,cap_net_admin,cap_sys_ptrace=eip /home/realtehreal/.steam/root/compatibilitytools.d/Proton-5.9-GE-8-ST/dist/bin/wine64
    sudo setcap cap_net_raw,cap_net_admin,cap_sys_ptrace=eip /home/realtehreal/.steam/root/compatibilitytools.d/Proton-5.9-GE-8-ST/dist/bin/wineserver

When I now try to run FFXIV or ACT using the ~/bin/ffxiv-run-*.sh, this is what I get:

wine64: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory

Wondering what's going on here.

Finally, getting to the point:
Is there currently any best way to get this to work on an up to date Debian based distribution?

Edit: quote corrected

The libwine.so.1 error seems to be connected to
https://www.reddit.com/r/linux_gaming/comments/gc5qss/wine_and_ping_support_on_ubuntu_a_guide/

Now trying to get around it with proton.

The instructions in that reddit post are how the old, manual setup used to work (modify the system ld.so.conf.d setup) and as indicated can brick your system.

The new method is to patch the wine/proton binaries' RPATH (see https://github.com/valarnin/ffxiv-tools/blob/master/setup-stage2.sh#L142-L182). You'll either need to manually replicate the logic there, or run only the stage2 setup file.

Thanks for the clarification. When I find the time, I'll try again then.

It finally worked out somehow. I had to start over several times until I found out that I had to install dotnet40, dotnet46, dotnet461, dotnet462, dotnet471 and dotnet472 manually into my Proton prefix before using ffxiv-tools. Don't ask me why it had to be done beforehand, maybe an issue on my side.
After everything went smooth, trying to run ffxiv-run-act.sh or ffxiv-run-game.sh threw an error:
realtehreal@home:~/bin$ sh ffxiv-run-act.sh ffxiv-run-act.sh: 16: export: $SDL_GAMECONTROLLERCONFIG: bad variable name

Had to change the following line within ffxiv-env-setup.sh
export $'SDL_GAMECONTROLLERCONFIG=[a lot of data]'
to
export SDL_GAMECONTROLLERCONFIG='[a lot of data]'

Now both the game and ACT can run and both work. Unfortunately my gamepad won't work like it did via Steam. Currently trying to get around it with https://github.com/AntiMicroX/antimicroX.

Edit: typo

Edit2:
Not a chance. AntiMicroX detects the gamepad - ffxiv doesn't. Maybe I'm still doing something wrong. Now I'm stuck and out of ideas :-/

Edit ~/bin/ffxiv-run-game.sh, add export WINEDEBUG=warn+all after the sourcing of the environment script, then run the ~/bin/ffxiv-run-game.sh script from terminal, redirect the output to file (there'll be a ton of it), and check for any missing library warnings.

Thanks so far for actually caring.

There really is a lot of stuff in the log. Looking for library warnings, especially these lines caught my attention:

02c8:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\mnt\\games\\steam\\steamapps\\common\\FINAL FANTASY XIV Online\\game\\XInput1_3.dll" not found (c0000034)

02c8:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\mnt\\games\\steam\\steamapps\\common\\FINAL FANTASY XIV Online\\game\\XInput9_1_0.dll" not found (c0000034)

02c8:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\home\\realtehreal\\.local\\share\\Steam\\compatibilitytools.d\\Proton-5.9-GE-8-ST\\dist\\lib64\\wine\\xinputxiv3.dll" not found (c0000034)

02c8:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\home\\realtehreal\\.local\\share\\Steam\\compatibilitytools.d\\Proton-5.9-GE-8-ST\\dist\\lib64\\\\wine\\xinputxiv3.dll" not found (c0000034)

02c8:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\home\\realtehreal\\.local\\share\\Steam\\compatibilitytools.d\\Proton-5.9-GE-8-ST\\dist\\lib\\\\wine\\xinputxiv3.dll" not found (c0000034)

02c8:warn:module:find_builtin_dll cannot find builtin library for L"XInputXIV3.dll"

The XInputXIV3.dll (alongside with a few other) exists inside the game installation folder. Copying them to the (Proton) Wine folder makes no difference - Proton then tells me that the dlls are ignored because they're not built-in files.

Those warnings are irrelevant. You're looking for missing .so files. If there are no missing .so files reported in the log file, you may want to double check the contents of the SDL_GAMECONTROLLERCONFIG env var when you're in the FFXIV environment. You can do that by:

# run the ffxiv env wrapper script
~/bin/ffxiv-env.sh
# you should now be on a bash terminal in the game's wine prefix folder
# print out the env var
echo $SDL_GAMECONTROLLERCONFIG

Found some missing .so files:
0050:warn:mountmgr:load_hal_functions failed to load HAL support: libhal.so.1: cannot open shared object file: No such file or directory

0080:err:module:load_so_dll failed to load .so lib "/home/realtehreal/.local/share/Steam/compatibilitytools.d/Proton-5.9-GE-8-ST/dist/lib64/wine/winebus.sys.so": libudev.so.0: cannot open shared object file: No such file or directory

0024:warn:cursor:load_libpng failed to load libpng12.so.0 (first)

00c8:warn:cursor:load_libpng failed to load libpng12.so.0 (second)

I got rid of the libudev.so.0 complaint by creating a symlink so my installed libudev.so.1 library. Not sure if this is the way to do it but at least it didn't complain yet (error fixed for now).

About libhal.so.1: All I could find on the internet was that it's really outdated. I'm not even sure what this lib does. Hopefully it's not about the gamepad.

libpng12.so.0: Regarding to the internet, this one's outdated as well. At least I found a way to install the x64 version. Seems like there's no chance of installing the 32 bit version on a modern system.

What do you think? So far so good or not a chance to still make it work? :-)

libudev.so.0 was likely the cause of the gamepad issues. Did you test gamepad after fixing that?

I did and it didn't work at first.
I then let steam rewrite the $HOME/.steam/steam/config/config.vdf and then copied the right gamepad config from the SDL_GamepadBind variable. Now finally everything works.

Summary of what I had to do on a Ubuntu (Debian) based system (here Pop!_OS) (in case someone got some issues as well):

  • Installed libpng12.so.0 from here - make sure to carefully read to get the right version for your distribution.
  • Preinstalled dotnet40, dotnet46, dotnet461, dotnet462, dotnet471 and dotnet472 into my Proton prefix (ffxiv-tools' setup didn't work for me for whatever reason but never mind that).
  • Created a symlink libudev.so.0 pointing to libudev.so.1 inside the /usr/lib/x86_64-linux-gnu/ folder.
  • Changed export $'SDL_GAMECONTROLLERCONFIG=...' line inside $HOME/bin/ffxiv-env-setup.sh to export SDL_GAMECONTROLLERCONFIG='...'.
  • Took the right gamepad config from SDL_GamepadBind variable inside the $HOME/.steam/steam/config/config.vdf and overwrote the SDL_GAMECONTROLLERCONFIG inside $HOME/bin/ffxiv-env-setup.sh with it.

Thank you very much for your support 👍