HGL
Heroic Games Launcherβ€’6mo ago
ambitious-aqua

X4: Foundations gets stuck on launch

Hi! I am working on the Linux-native game X4: Foundations and would like to test the GOG build for regressions. I am able to run the Steam version fine (via Steam Runtime 1.0), but running the GOG version installed via Heroic just hands after pressing play (no game window is opened). I tried both the Flatpak and native (NixOS) versions of Heroic. Editing the game's testandlaunch script to set LD_DEBUG=libs, I see a bunch of printing about missing X11 functions, like so (truncated because there are hundreds of these):
207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XMissingExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XMissingExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XextAddDisplay (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XextAddDisplay (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XextCreateExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XextCreateExtension (fatal)
207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XMissingExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XMissingExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XextAddDisplay (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XextAddDisplay (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: XextCreateExtension (fatal)

207491: /lib/libX11.so.6: error: symbol lookup error: undefined symbol: _XextCreateExtension (fatal)
I also see near the end two SDL2 functions missing:
207491: lib/libSDL2-2.0.so.0: error: symbol lookup error: undefined symbol: udev_device_get_action (fatal)

207491: lib/libSDL2-2.0.so.0: error: symbol lookup error: undefined symbol: _udev_device_get_action (fatal)
207491: lib/libSDL2-2.0.so.0: error: symbol lookup error: undefined symbol: udev_device_get_action (fatal)

207491: lib/libSDL2-2.0.so.0: error: symbol lookup error: undefined symbol: _udev_device_get_action (fatal)
I have attached the full log file. What am I doing wrong?
48 Replies
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
To clarify, this is the unmodified game as downloaded from Heroic. The only thing I changed is adding LD_DEBUG=libs at the start of the last line of /home/mat/Games/Native/X4 Foundations/game/testandlaunch to get this output.
quickest-silver
quickest-silverβ€’6mo ago
sometimes it doesn't make sense to run the Linux native build. Try the Windows build
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
I am a developer from Egosoft (the studio that makes X4). I'd like to make sure the Linux version is as good as possible for folks buying the game on GoG. In my case, it doesn't make sense to run the Windows build :)
quickest-silver
quickest-silverβ€’6mo ago
ah, working-working try checking the box for preferring system libraries
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Yes 😁 Nah, same thing with the libX11 symbols issue.
quickest-silver
quickest-silverβ€’6mo ago
there have been other users having some NixOS specific issues. you could try another distro to see if that's the case here
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Yeah I think I'll end up with a dual-boot on my work machine hah. I guess Arch or Debian would be good for checking?
quickest-silver
quickest-silverβ€’6mo ago
I would go with Arch or Fedora rather than Debian
conscious-sapphire
conscious-sapphireβ€’6mo ago
You can also use SLR on Heroic too
conscious-sapphire
conscious-sapphireβ€’6mo ago
No description
conscious-sapphire
conscious-sapphireβ€’6mo ago
Baldurs Gate- GOG Tho i dont have that mentioned game so i cant check if that indeed doesnt work with SLR on Heroic
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
I did try toggling that, it causes it to crash instead of hang, but I get the same function errors with LD_DEBUG=libs. Tomorrow at the office I will set up a dual boot with Fedora so I can test on a sane-person distro. (it would be neat to have the game work on NixOS as well, but I fear that this would require further packaging than just going thru GoG or Steam) So I've installed a Fedora Workstation 41 dual-boot and enabled mesa-git with sudo dnf copr enable xxmitsu/mesa-git and sudo dnf update --refresh -y, then reboot. Mesa 25 is required for this game on my hardware because of a driver bug, but it looks like launching it from Heroic still hits that bug. Is it possible Heroic is somehow running on Mesa 24 ?
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Specifically I get this issue, which is fixed in mesa 25. I checked with vulkaninfo --summary that I am indeed on mesa 25. The game runs fine from the command line if I just execute start.sh, but it does not run from Heroic.
No description
conscious-sapphire
conscious-sapphireβ€’6mo ago
9070 XT? If you installed Flatpak Heroic it might not be shipping Mess 25 yet in its stable runtime
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Nah it's an Intel card. There is an incompatibility with how we initialize Vulkan and how the Intel drivers handle it.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Thus just try with Appimage Heroic for sanity check It would use your system Mesa That statement is true for ANV as well? As in Windows Intel driver and Intel Linux driver are completely different Two different teams, two different drivers
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
The issue only occurs on Linux + Intel. I believe it's a bug on our end, but that all other drivers do not hit. Intel added a workaround in mesa 25 for when it detects X4, but obvs we are pushing a fix to it ourselves as well.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Yes, just found it
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Yep, there's me in the MR discussing w/ Lionel :)
conscious-sapphire
conscious-sapphireβ€’6mo ago
πŸ‘ Then appimage time Instead of flatpak
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
I installed the DNF instead, hope it's ok.
conscious-sapphire
conscious-sapphireβ€’6mo ago
To know for sure
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
eyy it runs πŸŽ‰
conscious-sapphire
conscious-sapphireβ€’6mo ago
That would be fine too Yay @Mat Btw it requires SLR for sure on Heroic too right?
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
It shouldn't... we build with SLR 1.0 at the moment, but that shouldn't cause it to be required, I think. We're looking to move to SLR 3.0 (sniper) mainly to enable Wayland support. I am not sure whether this would cause issues for GOG users, so I'd like to test it just in case.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Ah, ok Iirc SLR 3 is not toggleable by users Devs opt in to use it Unlike SLR 1.0 ( scout )
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Yes, we have an internal testing branch with 3.0 enabled.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Nice, joining to exclusive club of CS2, Dota 2 and Wesnoth 🐸
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
But we don't want the upgrade to cause issues for folks running outside of Steam, which is just GOG. Is there anything to watch out for, besides making sure it runs w/ Heroic on recent-ish Fedora/Ubuntu/Arch versions?
conscious-sapphire
conscious-sapphireβ€’6mo ago
Well, rest is pretty much out of your control. Like as in eg some compositors blowing up with the game or some misconfig on users end. Do note if you also target Steam Deck and devices that are like it ( via heroic GOG ) that uses distros like Bazzite; Heroic they have will be Flatpak. Which as said above has its runtime that they ship userspace drivers and those are being used instead of system one by default. I wouldnt bother too much with those, making sure every config under the sun running just fine is a hard task on Linux.
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
We do test on a Steam Deck at the office, though the official Steam Deck version uses Proton for save compatibility. I plan to look into this in the future, but for now the Linux-native version is not tested on Steam Deck.
conscious-sapphire
conscious-sapphireβ€’6mo ago
πŸ‘Yes but Deck users can use Heroic too And there they wont be defaulting to Proton
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Right right, of course. I'll raise that with the team then, though I would like to help make the Deck default to native anyways.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Nice to hear, there is some resentment about native versions in general from Linux community because often they get abandoned So this is a nice change
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Yeah, I see that in other games. I am very happy to have joined Egosoft who supports their games fully on both platforms :)
conscious-sapphire
conscious-sapphireβ€’6mo ago
In any case; once in a full moon ( not that short ) when glibc updates drops checking game is wise. As glibc updates sometimes breaks games
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Good to note. Shipping my own earlier games on Linux, I hit that glibc compatibility snag pretty quickly.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Recently fmod and few Valve games got broken due to that. https://qa.fmod.com/t/glibc-2-41-breaks-loading-fmodstudio-libraries-in-standalone-linux-builds/22592/2 Tho both parties fixed it. Bigger one was like three years earlier https://blog.hiler.eu/win32-the-only-stable-abi/
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Hah yeah I remember reading that. Linux does clearly benefit a lot from shipping source code, but sadly the games industry is not in a state where we can very easily do that.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Yes, prop sw has to retain compat indefinitely because they are not constantly rolling sw like browsers etc
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
I would love to have NixOS support for the game (why does it not work on Heroic with NixOS?) but I've no idea where to even begin with that. Maybe moving to Wayland will allow us to mostly ignore the x11 lib issues.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Most recent thing i remember about Nix is this
conscious-sapphire
conscious-sapphireβ€’6mo ago
GitHub
Games won't run (seems to hang) but launch command works directly i...
Describe the bug Something is different between running a game from within the Heroic GUI and using the same command in the shell. The first doesn't work while the second does. This is likely p...
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Well, dropping a SLR 3.0-built binary over the GOG install still seems to run fine, at least on Fedora. This bodes well.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Nice
ambitious-aqua
ambitious-aquaOPβ€’6mo ago
Thanks for the help and information :) I'll close this thread and make a new one if I run into more trouble.
conscious-sapphire
conscious-sapphireβ€’6mo ago
Yw πŸ‘ I marked it as solved

Did you find this page helpful?