Play via Moonlight/Sunlight

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

natomb
Posts: 29
Joined: Wed, 6. Nov 02, 20:31
x2

Play via Moonlight/Sunlight

Post by natomb »

Hi,

I want to play X4 via Moonlight/Sunlight.

Moonlight/Sunlight are Client/Server for remote gaming, quite similar to Steam Link or GeforceNow.

Yet, when I try to start X4 on the remote machine, it tells me that "OpenAL32.dll" cannot be found. Yet, the Windows explorer shows me the file "openal32.dll" in the same folder as X4.exe . I also created a short cut to launch X4, setting the working dir to where X4 is installed at. No success.

Other games, e.g. Cities, Sims, etc. do work. Has anyone experience with this?

BTW: I have purchased and installed X4 via Steam.
natomb
Posts: 29
Joined: Wed, 6. Nov 02, 20:31
x2

Re: Play via Moonlight/Sunlight

Post by natomb »

To give a short update on this:

I renamed the file "openal32.dll" on disk to "OpenAL32.dll". Then, the game did not complain and started, but with black screen (waited for more than 24 hours to have this change).

So, I "waited" for some days and then started the repair process via Steam. And all of a sudden, X4 is starting, showing the start screen with menu, I can play the tutorial etc.. So, I can confirm that X4 is working via Moonlight/Sunshine remote play.

BUT: the performance is terrible. Actually, I run X4 (and sunshine) inside a KVM/QEMU Virtual Machine. Host is Ubuntu, client is Win11. The host has an Epyc7003 (16 cores, 32 threads, but 2.4GHz max. frequency), 1 TB DDR4 RAM. The client has assigned 8 cores of the CPU (dedicated, passthrough assignment, so no Linux scheduler that may interfere here), 32 GB of RAM, a Nvidia 4060 passthrough. Files are provided via a ZFS RAID3 with SSDs, total sequential read performance is ~74 GByte per second, latency is on average 0.5ms with a peak of 2ms . Starting X4 takes approx. 1 hour. Playing the tutorial is "okish". But loading an older savegame, jumping into a system gets the game frozen for ~30 minutes and afterwards all screens are scattered. Let me see if I can figure out this as well.

Is there anyone in the forum who was able to get X4 working in a VM (preferrably a KVM/QEMU VM)? Do you mind to share your setup? I mean Nvidia can do it on their GeforceNow service. Yet, it is annoying that even in paid plan you are disconnected after 6 hours, have to be active in the client to prevent disconnection (or use helpers like Autohotkey) and - recently - are limited to 100 hours gameplay per month. I mean X4 is a game where it is absolutely possible to idle for a day or two.
natomb
Posts: 29
Joined: Wed, 6. Nov 02, 20:31
x2

Re: Play via Moonlight/Sunlight

Post by natomb »

Ok, I resuscitated an old PC with a 3GHz CPU, put my graphics card in there, installed Bazzire (Fedora-based games-optimized Linux) and now everything works well and smooth via Sunshine / Moonlight more or less out ofthe box. Unfortunately, I have a second PC running now, consuming another ~150Watts per hour.
Imperial Good
Moderator (English)
Moderator (English)
Posts: 4933
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Play via Moonlight/Sunlight

Post by Imperial Good »

natomb wrote: Tue, 7. Jan 25, 19:30 Starting X4 takes approx. 1 hour. Playing the tutorial is "okish". But loading an older savegame, jumping into a system gets the game frozen for ~30 minutes and afterwards all screens are scattered. Let me see if I can figure out this as well.
Possibly an issue with the performance of your ZFS RAID3? To be honest I doubt ZFS and RAID3 are good for running games off of. It is my understanding that they add large overhead to I/O operations, especially with some of the more advanced and complex ZFS features. Gaming in general is trending to as simple and direct I/O as possible to try and minimise CPU and latency overhead. It is fairly common to see single NVMe drives tie or even beat load times of RAID arrays of NVMe drives despite the arrays being capable of a lot higher throughput in theory.

If I recall, X4 uses unbuffered I/O. This is I/O that skips OS based file caching and instead reads directly from the underlying storage with each call. It is possible that this behaviour is operating extremely inefficiently due to the added complexities of mounting a ZFS drive into windows and translating the requests into ZFS operations.
db48x
Posts: 107
Joined: Mon, 15. Jul 13, 06:25
x4

Re: Play via Moonlight/Sunlight

Post by db48x »

Imperial Good wrote: Thu, 30. Jan 25, 02:56 Possibly an issue with the performance of your ZFS RAID3?
Lol, no. None of what you said about ZFS is true. I’ve run X4 just fine off of a ZFS filesystem, and it used spinning rust. It’s just not a problem.
Imperial Good
Moderator (English)
Moderator (English)
Posts: 4933
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Play via Moonlight/Sunlight

Post by Imperial Good »

db48x wrote: Thu, 30. Jan 25, 18:07 Lol, no. None of what you said about ZFS is true. I’ve run X4 just fine off of a ZFS filesystem, and it used spinning rust. It’s just not a problem.
Yes but were you using de-duplication? Or file compression? And how did it compare to running X4 off a simple, single, decent NVMe drive?

I agree that 50 minute loading time is not the direct fault of ZFS, but instead more likely to be the way ZFS or the drives are configured or being accessed by Windows. Even still I stand by what I said that a single decent NVMe drive may out perform it in metrics such as access latency or CPU overhead which are important for games.

Spinning rust will never be ideal for games. A single modern NVMe drive can achieve over 4 GB/sec of 4 kb random reads. For practical purposes random reads do not affect the I/O performance of a reasonable modern NVMe drive. A single HDD can achieve maybe 6 MB/sec of similar workload, maybe more for higher density or faster RPM drives.

Return to “X4: Foundations - Technical Support”