Bug 264973 - emulators/wine-proton: Issue when launching DX11 game (FFXIV)
Summary: emulators/wine-proton: Issue when launching DX11 game (FFXIV)
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 09:47 UTC by skyliegirl33
Modified: 2025-02-01 18:03 UTC (History)
8 users (show)

See Also:
iwtcex: maintainer-feedback+


Attachments
Output when launching FFXIV directly (4.58 KB, text/plain)
2022-07-08 12:04 UTC, skyliegirl33
no flags Details
How to run FFXIV (4.13 KB, text/plain)
2024-07-31 16:10 UTC, Sascha Folie
no flags Details
Warning after pressing "play" (2.51 KB, image/png)
2024-07-31 16:12 UTC, Sascha Folie
no flags Details
How to run FFXIV v2 (4.34 KB, text/plain)
2024-08-01 19:50 UTC, Sascha Folie
no flags Details
How to run FFXIV v3 (4.59 KB, text/plain)
2025-02-01 18:01 UTC, Sascha Folie
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description skyliegirl33 2022-07-01 09:47:33 UTC
When attempting to launch this game, there's an unlocalized error saying there was an unexpected issue. I noticed this from the wine log:

0140:err:dbghelp_msc:codeview_process_info Unknown CODEVIEW signature 00000000 in module L"ntdll"
0x000000017007932d ntdll+0x7932d: addb  %al,(%rax)
0128:warn:virtual:free_ranges_insert_view range 0xe30000 - 0xe50000 is already mapped
Wine-dbg>bt
Backtrace:
=>0 0x000000017007932d A_SHAFinal+0x52cad() in ntdll (0x0000000000000000)

This doesn't happen with emulators/wine and the game works okay there, albeit with no audio. It does happen with emulators/wine-devel as well. It doesn't matter if I use DXVK, WineD3D or software rendering; the same issue persists. Can provide additional logs if needed.
Comment 1 Alex S 2022-07-01 12:26:07 UTC
Since this happens with wine-devel, try reporting that issue to the upstream (https://bugs.winehq.org).
Comment 2 skyliegirl33 2022-07-01 21:51:39 UTC
(In reply to Alex S from comment #1)
Good idea, did that. I guess this can be closed then
Comment 3 Sascha Folie 2022-07-06 18:31:40 UTC
I am still on wine-devel 7.0-rc4 because 7.1 (switch to "--with-mingw") broke FFXIV for me like you describe.

A few days ago the same happend with 7.0-rc4.
It looks like the switch from gcc 10 to 11 (https://cgit.freebsd.org/ports/commit/?id=cad2f66a384d74cffa870d978722e6fd579c7d2f) broke it again.

I am compiling gcc 10 right now and will report back tomorrow if this fixed it.

I also have no audio while playing the game. I believe this is because of virtual_oss and how FFXIV opens audio devices.
Comment 4 Alex S 2022-07-06 19:43:07 UTC
FYI, I don't have access rights to set "See Also" field to https://bugs.winehq.org/show_bug.cgi?id=53297.

(In reply to Sascha Folie from comment #3)

> I also have no audio while playing the game. I believe this is because of virtual_oss and how FFXIV opens audio devices.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259719#c14?
Comment 5 Sascha Folie 2022-07-06 20:03:32 UTC
(In reply to Alex S from comment #4)

I know about that Bugreport and tried your virtual_oss command which made a few games work (for example factorio).
But FFXIV is still broken.
Comment 6 Sascha Folie 2022-07-07 17:55:34 UTC
wine-devel 7.0-rc4 works when switching gcc back from 11 to 10.

- FreeBSD Current/13.1 wine-devel 7.1+ broken (since mingw)
- FreeBSD Current/13.1 wine-devel 7.0-rc4 broken (since gcc11)

I used wine-proton at some point last year and FFXIV worked but I don't know if this is still the case.
Comment 7 skyliegirl33 2022-07-07 18:37:47 UTC
The cause seems to be vague. Is it GCC.. or MinGW? It doesn't seem to be one or the other, because if I change wine-proton 6.3 to force GCC 10, it still fails with the same error. Never seen this issue on Linux personally, so I wonder if it is a wine problem or not.
Comment 8 Sascha Folie 2022-07-07 20:03:40 UTC
wine-proton-6.3.2 works for me with gcc10.

I'm using FreeBSD 14.0-CURRENT #0 main-n256504-836d47d38e0 with nvidia-driver-470 right now.
Comment 9 skyliegirl33 2022-07-07 20:05:57 UTC
Something isn't adding up then.. because that does not work for me. I have my own branch of 5.11 DRM drivers for my AMD card, but I doubt that's a problem.
Comment 10 Bartek Jasicki 2022-07-08 05:45:48 UTC
As far I see, Valve reported that FFXIV is fixed in wine-proton 7.0_3:

https://github.com/ValveSoftware/Proton/releases/tag/proton-7.0-3

You could give a try to update wine-proton with patch from there: 

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263196

file: 6.3.2_5_to_7.0.3.patch
Comment 11 skyliegirl33 2022-07-08 05:47:18 UTC
That's the new launcher. This isn't a launcher issue, the *game itself* is erroring out. It's like it fails to create DX11 context or something.
Comment 12 Bartek Jasicki 2022-07-08 06:20:16 UTC
From time to time, Wine broke something between versions. Other options to test are different versions of DXVK or the graphic card driver. The last can be a problem too, an example with Nvidia driver: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263475

Another try: different version of DirectX? I see FF XIV allows to change it via command line.

The sound maybe will work after installing xaudio via Winetricks.

Also, what output it gives when runs with WINEDEBUG=warn environment variable? It may be more useful than winedbg, which usually isn't too helpful thing. Especially on FreeBSD.
Comment 13 skyliegirl33 2022-07-08 06:22:57 UTC
I'll see if I can add output for that when I reboot into FreeBSD. DirectX version doesn't make a difference, the error is only slightly changed, but it still fails. DXVK versions don't make a difference either, nor does WineD3D. I do agree that drivers could be an issue, yes, but considering other games seem to function just fine, it seems odd to me.
Comment 14 skyliegirl33 2022-07-08 12:04:52 UTC
Created attachment 235124 [details]
Output when launching FFXIV directly
Comment 15 Bartek Jasicki 2022-07-08 17:08:55 UTC
If I guess correctly, it has some problems with some driver, just question is: which one. :) I have some ideas to check:

1. If it is possible, could you run the game with disabled sound system? It is usually done by command line parameters, like -nosound /nosnd, etc. I don't know if FFXIV allows that.

2. Maybe try to recreate wine prefix? Sometimes it can mess everything around, especially after playing with different Wine versions.

3. I'm not sure if I read correctly, but it looks like you are trying to run the 32-bit version of the game. Perhaps, if it is possible, try to run 64-bit?
Comment 16 skyliegirl33 2022-07-08 21:20:59 UTC
1) Not possible with FFXIV to my knowledge, and sound isn't the problem here. I was able to launch the game with emulators/wine (6.0.4). Had no sound until I recompiled wine with pulse support.

2) I've done that several times, it makes no difference.

3) No, this is a 64-bit game, but wine will correctly use wine64 when needed. Directly using wine64 makes no difference, anyway.
Comment 17 Bartek Jasicki 2022-07-09 06:14:35 UTC
I see. But now I think that the sound is the problem. ;) If the game works only with PulseAudio, it means it is perhaps a victim of the bug mentioned here: https://bugs.winehq.org/show_bug.cgi?id=50214

Which isn't a bug in Wine, but in FreeBSD: lack of some features in FreeBSD OSS implementation.

The workaround with PulseAudio can work with some versions of Wine, but not all.

More advanced thing to test: compile the kernel with disabled sound module and replace it with *oss* module from ports: https://www.freshports.org/audio/oss/
Comment 18 skyliegirl33 2022-07-21 08:18:53 UTC
Unfortunately, that's not really worth testing for me. The issue is not sound as I said, because even without a working audio driver for Wine, it *does* launch on emulators/wine. I did a bit of reverse engineering of the game using Ghidra, and the error is used for several things, but it seems to be DirectX failing to initialize, which is what I thought.
Comment 19 Lynn Davenport 2024-03-26 07:24:09 UTC
MARKED AS SPAM
Comment 20 Gerald Pfeifer freebsd_committer freebsd_triage 2024-07-29 22:40:28 UTC
I believe two years after the last real update and given how Wine 
and the different ports have evolved (e.g. two major versions), it
doesn't make sense to keep this open any longer?
Comment 21 Sascha Folie 2024-07-30 14:50:52 UTC
(In reply to Gerald Pfeifer from comment #20)

I believe it is still broken. I'll run some tests and report back.
Comment 22 Sascha Folie 2024-07-31 16:10:28 UTC
Created attachment 252400 [details]
How to run FFXIV
Comment 23 Sascha Folie 2024-07-31 16:12:13 UTC
Created attachment 252401 [details]
Warning after pressing "play"
Comment 24 Sascha Folie 2024-07-31 16:18:23 UTC
I did all tests on FreeBSD 15.0-CURRENT #0 main-n271414-1d897d19f31d.

- wine-devel: 9.12,1

Seems to be still broken.
-> wine: could not load kernel32.dll, status c0000135

- wine: 9.0_2,1

Wine itself works but the FFXIV launcher does not load because of a know (old) bug which seems to be only fixed in proton.

- wine-proton: 9.0.1

Proton and the launcher work but FFXIV will not launch after hitting the "play" button. This is the same problem as years ago.
This seems to be a FreeBSD bug because Linux will run FFXIV on the same PC.

I have added a screenshot of the warning after pressing the "play" button. The other attachment is my description how I ran my tests.
If someone wants to test, FFXIV is free to play up to some point in the story. You need to create a Square Enix account and download the whole game (~95GB).

I'd like to keep this bug open because it is not fixed.
But I am not sure how to debug this any further.
Comment 25 Gerald Pfeifer freebsd_committer freebsd_triage 2024-07-31 21:13:45 UTC
(In reply to Sascha Folie from comment #24)
> - wine-devel: 9.12,1
>
> Seems to be still broken.
> -> wine: could not load kernel32.dll, status c0000135

This should be addressed in the current tree (which has Wine 9.13
plus an extra patch).

> I'd like to keep this bug open because it is not fixed.

I can reopen it, it just looks very unlikely someone is going to 
(be able to successfully) look into it. Not a happy statement,
just realistic.
Comment 26 Sascha Folie 2024-08-01 19:50:56 UTC
Created attachment 252438 [details]
How to run FFXIV v2

wine-devel Update from 9.12 to 9.13
Comment 27 Sascha Folie 2024-08-01 19:57:25 UTC
(In reply to Gerald Pfeifer from comment #25)

wine-devel itself 9.13 works, thanks for that!
Now it works or "fails" the same way like normal wine with a broken FFXIV launcher.

This means for now you need proton to run the launcher, which will fail to run the game itself.

Since this seems to be a FreeBSD problem I'd like to keep this open for now even if there is a low chance for someone to actually find the solution.
Comment 28 Christos Margiolis freebsd_committer freebsd_triage 2024-11-16 18:16:20 UTC
Hello, could you please test if this patch fixes the AFMT_FLOAT issue mentioned?

https://reviews.freebsd.org/D47638
Comment 29 Sascha Folie 2024-11-16 19:28:59 UTC
Thanks for working on AFMT_FLOAT support.
Unfortunately it is not possible to test FFXIV because it still doesn't work on FreeBSD.

wine-devel seems to be missing some patches to make the launcher work and last week I tried wine-proton 9.0-2 which failed to download the game.
Comment 30 Christos Margiolis freebsd_committer freebsd_triage 2025-01-30 17:23:51 UTC
Could you please re-test https://reviews.freebsd.org/D47638 and let me know if there is any problem with either audio or performance?
Comment 31 Sascha Folie 2025-02-01 18:01:44 UTC
Created attachment 257166 [details]
How to run FFXIV v3
Comment 32 Sascha Folie 2025-02-01 18:03:15 UTC
(In reply to Christos Margiolis from comment #30)

There is no way to test AFMT_FLOAT because FFXIV is still broken on FreeBSD.