UnleashedRecomp icon indicating copy to clipboard operation
UnleashedRecomp copied to clipboard

Application not launching with graphics within Flatpak

Open thesupersonic16 opened this issue 9 months ago • 18 comments

Validation

  • [x] I have checked the Issues page to see if my problem has already been reported
  • [ ] I have confirmed that this bug does not occur in the original game running on original Xbox 360 hardware

If you have DLC installed, please specify which ones you have.

  • [x] Apotos & Shamar Adventure Pack
  • [x] Chun-nan Adventure Pack
  • [x] Empire City & Adabat Adventure Pack
  • [x] Holoska Adventure Pack
  • [x] Mazuri Adventure Pack
  • [x] Spagonia Adventure Pack

If you have mods enabled, please specify which ones you have.

N/A, Not installed

If you have codes enabled, please specify which ones you have.

N/A, Not installed

Describe the Bug

Unleashed Recompiled does not launch properly while in Flatpak, trying to launch will create a window that doesn't appear to respond or cannot be shown, with gamepad input and game audio playing perfectly. The game also writes a constent Vulkan error which I would have to guess is the cause or atleast failed from a cause before it.

Console output:

$ flatpak run io.github.hedge_dev.unleashedrecomp
[*] OS does not support registry.
[*] SDL video driver: "wayland"
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1661:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1662:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1663:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1664:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1665:1: unrecognized keysym "dead_hamza" on left-hand side
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.
^C
vkCreateSwapchainKHR failed with error code 0xFFFFFFFD.                                                                                                                
[*] Saving configuration...

Steps to Reproduce

flatpak run io.github.hedge_dev.unleashedrecomp

Expected Behavior

Application window to open with frames

Footage

Image

Specifications

Fill out the following details:

  • CPU: Intel Core i5-11400H
  • GPU: NVIDIA GeForce RTX 3050 Mobile
  • GPU Driver: NVIDIA driver 550.144.03 (PRIME)
  • OS: Manjaro KDE (Kernel 6.12.17)
  • Version: 1.0.1, 1.0.2, cc1018a

Additional Context

I believe this started when I have updated my GPU drivers. I have also tried uninstalling all flatpak packages and reinstalling the Unleashed Recompiled bundle including all the required dependencies from Flathub. I have also made sure I have no overrides setup for the Flatpak. I have also tried switching between x11 and Wayland.

The game will still take input from a game controller if AllowBackgroundInput is enabled.

This issue seems to only occur while running within a Flatpak, extracting the main binary from the Flatpak bundle and launching it starts the game with no issues at all including GPU detection.

Could be a me issue.

thesupersonic16 avatar Mar 11 '25 16:03 thesupersonic16

Error code corresponds to VK_ERROR_INITIALIZATION_FAILED.

DarioSamo avatar Mar 11 '25 16:03 DarioSamo

Hi, this is a known issue with flatpak and discrete GPUs in hybrid mode, most common in laptops.

Example of the bug here for Dolphin flatpak, with resolution step: https://youtu.be/elIi0IoyzKs

This affects any flatpaks that try to leverage your dGPU. The bug will be resolved once you have initialized your dGPU with a native program.

To resolve the issue you need to launch a non-flatpak program on your dGPU. For example, you could open Blender, or run the native Dolphin (not the flatpak) set to your Nvidia dGPU for the Graphics Backend. Until you reboot, any flatpak will be able to properly access your dGPU.

dreamsyntax avatar Apr 01 '25 06:04 dreamsyntax

@thesupersonic16 Has this suggested workaround resolved your issue?

DeaTh-G avatar Apr 05 '25 06:04 DeaTh-G

I don't have the exact system on me right now. When I do I will see if I can reproduce the issue and see if the suggested workaround consistently resolves my issue.

thesupersonic16 avatar Apr 05 '25 06:04 thesupersonic16

@thesupersonic16 have you had a chance to test the the workaround?

DeaTh-G avatar Apr 13 '25 06:04 DeaTh-G

I still do not have the system on me right now. I still plan to check when I get it back.

thesupersonic16 avatar Apr 13 '25 07:04 thesupersonic16

I have updated my Manjaro KDE system and can nolonger reproduce my issue even with and without the recharger and launching the flatpak right away. I could not test before the update due to unrelated issues I had with my FS.

The game in the Flatpak seems to now detect my discrete GPU aswell.

New tested details:

  • CPU: Intel Core i5-11400H
  • GPU: NVIDIA GeForce RTX 3050 Mobile
  • GPU Driver: NVIDIA driver 570.133.07 (PRIME)
  • OS: Manjaro KDE (Kernel 6.12.21-4)
  • Version: 1.0.2, 1.0.3

thesupersonic16 avatar Apr 17 '25 08:04 thesupersonic16

If you no longer run in hybrid this bug would not apply to you. I'll record a sample, worth keeping open to avoid duplicates until underlying flatpak issue is resolved.

dreamsyntax avatar Apr 17 '25 08:04 dreamsyntax

I am unsure what caused this change, if you know what might have happened that caused the issue to not reappear or to cause my system to not run in hybrid, then please let me know.

thesupersonic16 avatar Apr 17 '25 08:04 thesupersonic16

Confirmed this still happens for latest drivers and flatpak runtime: https://youtu.be/DXzErTN7kz8

dreamsyntax avatar Apr 17 '25 22:04 dreamsyntax

I don't know why but game doesn't use my dgpu and instead it uses my igpu is there any reason why?

Image

ArtemGT69 avatar Jun 08 '25 15:06 ArtemGT69

I don't know why but game doesn't use my dgpu and instead it uses my igpu is there any reason why?

Image

Check out the "device names" available (bottom of the F1 menu). You can copy and type the option directly into your configuration.

DarioSamo avatar Jun 08 '25 15:06 DarioSamo

I don't know why but game doesn't use my dgpu and instead it uses my igpu is there any reason why? Image

Check out the "device names" available (bottom of the F1 menu). You can copy and type the option directly into your configuration.

I don't really know what to say Image

ArtemGT69 avatar Jun 08 '25 16:06 ArtemGT69

I don't really know what to say Image

Your discrete GPU is not available for whatever reason. The error in the console is likely related.

Sadly there's not much we can do here. It's most likely an initialization error from the driver on your system. Could be a Flatpak runtime error.

DarioSamo avatar Jun 08 '25 16:06 DarioSamo

I don't really know what to say Image

Your discrete GPU is not available for whatever reason. The error in the console is likely related.

Sadly there's not much we can do here. It's most likely an initialization error from the driver on your system. Could be a Flatpak runtime error.

but I must say that on 570 version of nvidia open drivers it worked fine

ArtemGT69 avatar Jun 08 '25 16:06 ArtemGT69

nvm after flatpak update, it worked!

Image

ArtemGT69 avatar Jun 08 '25 16:06 ArtemGT69

nvm after flatpak update, it worked!

Image

also console output is different Image

ArtemGT69 avatar Jun 08 '25 16:06 ArtemGT69

I does appear to just be the dgpu not being initialized. The way I got around it was by launching the game through lutris with the dgpu as the selected graphics driver.

RobotZGalaxy avatar Sep 27 '25 22:09 RobotZGalaxy