doitsujin / ffxiv-benchmark-launcher

FFXIV Benchmark Launcher for Linux
22 stars 3 forks source link

[NOT A BUG] Gratitude for making this #1

Open silvernode opened 4 months ago

silvernode commented 4 months ago

I struggled with getting the benchmark going in Lutris. I got it working by installed dotnet48 with winetricks but the next problem was that the settings up the benchmark tool were not changing anything and changing the resolution did nothing. Also the character creator button would launch the benchmark instead of the character creator screen. I almost gave up and then I found your tool.

Thank you so much for making this quick script. I owe you a lot of gratitude for allowing Linux users to easily run the benchmark. <3

mihawk90 commented 4 months ago

Would just like to leave a thanks as well! Tried via Lutris too but didn't look into why it wouldn't launch much, script however works perfectly.


One note though for anyone stopping by:

  1. Using the Borderless option seems to ignore the set resolution and just uses the native monitor resolution of whatever monitor it's launching on (if you have multiple monitors). Use Windowed or Fullscreen instead.
  2. Just like in the Endwalker Benchmark, the resolution shown in the bottom left is incorrect. Launching in the default 720p is noticeably smoother and does show higher FPS, the bottom left still says 2160p though (for me anyway because it launches on my TV for whatever reason).

Also, do multiple runs. The first run will tank performance as is expected due to shader caching.

silvernode commented 4 months ago

I am super curious what the script does to make things work so effortlessly. I guess I could look at the code (which I will also do) but hearing it from the developer is a bonus.

mihawk90 commented 4 months ago

The script writes the settings file commandline-arguments and launches the ffxiv.exe directly:

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L686

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L717

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L719

What Lutris (well, WINE, not really a Lutris issue) is having issues with is the Launcher to do all the settings, we're not even getting to the actual Benchmark part. Essentially this script just gets around the headache of trying to get the Launcher to work in the first place.

silvernode commented 4 months ago

The script writes the ~settings file~ commandline-arguments and launches the ffxiv.exe directly:

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L686

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L717

https://github.com/doitsujin/ffxiv-benchmark-launcher/blob/bea7d6ab0854f880d12afa20ffb913a25f27b3f6/ffxiv-benchmark.py#L719

What Lutris (well, WINE, not really a Lutris issue) is having issues with is the Launcher to do all the settings, we're not even getting to the actual Benchmark part. Essentially this script just gets around the headache of trying to get the Launcher to work in the first place.

Ah that makes sense, so we were struggling trying to get their launcher to cooperate but because it refused to do so, we ended up not being able to properly call the actual executable files that do the heavy lifting. It;s always Square Enix's launchers that throws a cork in everything. The base game launcher for the actual game uses Internet Explorer 11 as it's runtime if I am not mistaken and it took years to get that working properly with proton without major wine hacks.

mihawk90 commented 4 months ago

Yup, pretty much

The base game launcher for the actual game uses Internet Explorer 11 as it's runtime if I am not mistaken and it took years to get that working properly with proton without major wine hacks.

The old one did, not sure what the new one uses. Was surprised that it just worked when they finally disabled the old launcher. On the plus side: since the Mac version just uses WINE/Crossover as well, we should always be able to make it work on Linux as long as we're just following whatever they do with the Mac version :) (which on the other hand is probably also why there is no benchmark for Mac)

silvernode commented 4 months ago

Yup, pretty much

The base game launcher for the actual game uses Internet Explorer 11 as it's runtime if I am not mistaken and it took years to get that working properly with proton without major wine hacks.

The old one did, not sure what the new one uses. Was surprised that it just worked when they finally disabled the old launcher. On the plus side: since the Mac version just uses WINE/Crossover as well, we should always be able to make it work on Linux as long as we're just following whatever they do with the Mac version :) (which on the other hand is probably also why there is no benchmark for Mac)

Indeed they do use Wine over there which begs the question, why not just support Linux at this point since there is no true Mac version and only a Windows one. It would probably be easier to fork a version of proton and target that as well as redistribute it with the game. It's a pipe dream but it would probably work pretty well. Anyway, it looks like this thread has evolved into a technical thread but hey I'm not complaining.

mihawk90 commented 4 months ago

why not just support Linux at this point since there is no true Mac version and only a Windows one

My guess: It's easier to support a set amount of Mac Versions as opposed to 20 distros with a million variables in configs and dependencies. As long as they're not actively blocking Linux (cough Bungie cough) I couldn't care less though :)

zten commented 4 months ago

This is probably not the right spot for this, but...

The launcher should work in Lutris if you use DXVK v1.10.3. It appears to use DX9 to start up the launcher, and then runs the actual benchmark with DX11. You will not have access to DLSS.

Using anything newer will have it cough up the following set of errors:

info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              1
info:      - Height:             1
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: false
info:                  ^ Format: D3D9Format::Unknown
info:      - Windowed:           true
info:      - Swap effect:        3
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211(ERROR / SPEC): msgNum: 301859828 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x11fe03f4 | vkGetPhysicalDeviceSurfaceCapabilitiesKHR():  surface is not supported by the physicalDevice. The Vulkan spec states: surface must be supported by physicalDevice, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211)
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525(ERROR / SPEC): msgNum: 309594885 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x12740b05 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525(ERROR / SPEC): msgNum: 309594885 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x12740b05 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525(ERROR / SPEC): msgNum: -500448280 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xe22bc3e8 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525(ERROR / SPEC): msgNum: -500448280 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xe22bc3e8 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Color space:  VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
info:    Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR (dynamic: yes)
info:    Buffer size:  928x536
info:    Image count:  3
info:    Exclusive FS: 0
VUID-VkSwapchainCreateInfoKHR-surface-01270(ERROR / SPEC): msgNum: -1585220531 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-surface-01270 ] Object 0: handle = 0x70c5aece31f0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x940000000094, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0xa183744d | vkCreateSwapchainKHR(): pCreateInfo->surface is not supported for presentation by this device. The Vulkan spec states: surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-01270)
    Objects: 2
        [0] 0x70c5aece31f0, type: 3, name: NULL
        [1] 0x940000000094, type: 1000000000, name: NULL
silvernode commented 4 months ago

This is probably not the right spot for this, but...

The launcher should work in Lutris if you use DXVK v1.10.3. It appears to use DX9 to start up the launcher, and then runs the actual benchmark with DX11. You will not have access to DLSS.

Using anything newer will have it cough up the following set of errors:

info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              1
info:      - Height:             1
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: false
info:                  ^ Format: D3D9Format::Unknown
info:      - Windowed:           true
info:      - Swap effect:        3
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211(ERROR / SPEC): msgNum: 301859828 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x11fe03f4 | vkGetPhysicalDeviceSurfaceCapabilitiesKHR():  surface is not supported by the physicalDevice. The Vulkan spec states: surface must be supported by physicalDevice, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211)
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525(ERROR / SPEC): msgNum: 309594885 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x12740b05 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525(ERROR / SPEC): msgNum: 309594885 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x12740b05 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525(ERROR / SPEC): msgNum: -500448280 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xe22bc3e8 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525(ERROR / SPEC): msgNum: -500448280 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-06525 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xe22bc3e8 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522(ERROR / SPEC): msgNum: -1068605726 - Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-06522 ] Object 0: handle = 0x70c5ad3812e0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xc04e5ee2 | truncated for brevity
    Objects: 1
        [0] 0x70c5ad3812e0, type: 2, name: NULL
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Color space:  VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
info:    Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR (dynamic: yes)
info:    Buffer size:  928x536
info:    Image count:  3
info:    Exclusive FS: 0
VUID-VkSwapchainCreateInfoKHR-surface-01270(ERROR / SPEC): msgNum: -1585220531 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-surface-01270 ] Object 0: handle = 0x70c5aece31f0, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x940000000094, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0xa183744d | vkCreateSwapchainKHR(): pCreateInfo->surface is not supported for presentation by this device. The Vulkan spec states: surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-01270)
    Objects: 2
        [0] 0x70c5aece31f0, type: 3, name: NULL
        [1] 0x940000000094, type: 1000000000, name: NULL

Thank you for this post! It explains a lot, I did not try changing versions on DXVK and will report back with my findings.

doitsujin commented 4 months ago

Glad to hear people are finding this useful. Probably time to fix some silly little issues that this thing quite obviously has.

Using the Borderless option seems to ignore the set resolution and just uses the native monitor resolution of whatever monitor it's launching on (if you have multiple monitors). Use Windowed or Fullscreen instead.

This is expected and in line with what the Borderless option does on the Windows launcher. I guess we could grey out the resolution field, but it's not too important either way.

Just like in the Endwalker Benchmark, the resolution shown in the bottom left is incorrect. Launching in the default 720p is noticeably smoother and does show higher FPS, the bottom left still says 2160p though (for me anyway because it launches on my TV for whatever reason).

For some stupid reason, the benchmark doesn't display the resolution it was actually launched with, but the one that's stored in ffxivbenchmarklauncher.ini. This script currently doesn't change any of the settings in there, we only use that file to pull out the score after the run.

Edit: Updated the thing to write the resolution to the file, but it may still be wrong in some cases since we don't query display modes and we don't know on which monitor the app is going to run on in the first place.

coldReactive commented 1 month ago

I'm grateful so far for this, because Lutris just flat out exits before anything appears, and proton will show the loading box before quitting. You should probably write a README.md for the future that has the following. it will appear on the main page of your Code page as the documentation.

Requirements

wine pyqt6-python

Execution

If you haven't done already, chmod +x ffixv-benchmark-launcher.py

Then run it, ./ffxiv-benchmark-launcher.py

On the Launch tab, make sure the top field for directory is set to whatever the benchmark folder that has the exe file in it is, such as ffxiv-dawntrail-bench.exe