Linux Support (Beta)

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

Moderator: Moderators for English X Forum

Chocrates
Posts: 8
Joined: Sat, 17. Oct 20, 23:19

Re: Linux Support (Beta)

Post by Chocrates » Sun, 18. Oct 20, 22:56

Panos wrote:
Sun, 18. Oct 20, 22:54
Chocrates wrote:
Sun, 18. Oct 20, 03:06
Ah good point, the game won't even load enough to make video setting changes.

Edit: It is definitely the hotfix. Under Beta's I can rollback to 3.30 and it works just fine.

My glxinfo

Code: Select all

chris@fluffie:~$ glxinfo | grep "Mesa"
client glx vendor string: Mesa Project and SGI
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.0-devel (git-57d3178 2020-10-17 focal-oibaf-ppa)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.0-devel (git-57d3178 2020-10-17 focal-oibaf-ppa)
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.0-devel (git-57d3178 2020-10-17 focal-oibaf-ppa)
Don't use Beta then. However on Manjaro had no issue with the Beta versions :)
Haha I am saying that vanilla DOESN"T work, but Beta -> 3.30 (presumably the old version before Wednesdays hotfix) DOES work

KMcr
Posts: 35
Joined: Sun, 17. Jun 12, 15:04
x4

Re: Linux Support (Beta)

Post by KMcr » Mon, 19. Oct 20, 09:42

Another big thank you to Egosoft for making a penguin port of this fantastic game. It means I can finally get rid of Windows entirely (only had it to play X4 and use Office). I thought it might be flaky, but for the 8 hours or so I've played so far I've seen nothing (apart from a message about Steam client not running, but that was solved by restarting Steam) that stops me enjoying the game. And it does run smoother and prettier on Ubuntu Focal than Windows on (definitely) the same hardware.

Great work all!

Panos
Posts: 848
Joined: Sat, 25. Oct 08, 00:48
x4

Re: Linux Support (Beta)

Post by Panos » Mon, 19. Oct 20, 16:40

KMcr wrote:
Mon, 19. Oct 20, 09:42
Another big thank you to Egosoft for making a penguin port of this fantastic game. It means I can finally get rid of Windows entirely (only had it to play X4 and use Office). I thought it might be flaky, but for the 8 hours or so I've played so far I've seen nothing (apart from a message about Steam client not running, but that was solved by restarting Steam) that stops me enjoying the game. And it does run smoother and prettier on Ubuntu Focal than Windows on (definitely) the same hardware.

Great work all!
Yeah posted above same system, tested with 2 different GPUs, the game works 20% better on Linux than Windows 10. And saving is really fast process too.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: Linux Support (Beta)

Post by timon37 » Fri, 23. Oct 20, 16:33

@Chocrates
I'll need your full vulkaninfo output, easiest to throw it on pastebin.com or some such.

Besides that temporarily switch back to the official/vanilla release.
In steam game properties set launch option: -logfile log.txt
Then launch the game and let it crash.
Then it should create log.txt in your private folder ~/.config/EgoSoft/X4/<steam-user-id>/log.txt

Alm888
Posts: 487
Joined: Sat, 14. Sep 19, 19:38
x4

Re: Linux Support (Beta)

Post by Alm888 » Fri, 23. Oct 20, 18:17

timon37 wrote:
Fri, 23. Oct 20, 16:33
In steam game properties set launch option: -logfile log.txt
Then launch the game and let it crash.
Then it should create log.txt in your private folder ~/.config/EgoSoft/X4/<steam-user-id>/log.txt
Just out of curiosity, does the "-logfile" option work with non-steam releases (i. e. "GOG")? I've tried to launch, but the game just hangs, failing even to initialize the window (only the window header "X4" is visible, otherwise it is just a "screenshot" of whatever was shown prior to launch). Everything works fine without this option (3.30HF1).

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: Linux Support (Beta)

Post by timon37 » Sat, 24. Oct 20, 17:57

It should, although it has to be passed to the binary and I'm not sure if the gog scripts pass commandline options.
You could just edit them though.

Wait not sure if I understood properly, you mean that normally it runs fine but if you run it with "-logfile something.txt" it hangs?
Or do you mean that the game normally just hangs for you?

Chocrates
Posts: 8
Joined: Sat, 17. Oct 20, 23:19

Re: Linux Support (Beta)

Post by Chocrates » Sat, 24. Oct 20, 21:16

timon37 wrote:
Fri, 23. Oct 20, 16:33
@Chocrates
I'll need your full vulkaninfo output, easiest to throw it on pastebin.com or some such.

Besides that temporarily switch back to the official/vanilla release.
In steam game properties set launch option: -logfile log.txt
Then launch the game and let it crash.
Then it should create log.txt in your private folder ~/.config/EgoSoft/X4/<steam-user-id>/log.txt
Regrettably I don't need to resort to pastebin

Code: Select all

Logfile started, time Sat Oct 24 12:35:55 2020
[General] 0.00 'AMD RADV TONGA (ACO)' AMD-driver v20.2.99 (Vulkan 1.2.145) check=1
[General] 0.00 'Intel(R) HD Graphics 530 (SKL GT2)' gfx-driver v20.2.99 (Vulkan 1.2.145) check=1
I left it running for nearly an hour on the black screen,
Is there any way to enable different log levels?
I also enabled scriptlog and it didn't even make a log file for that.

Alm888
Posts: 487
Joined: Sat, 14. Sep 19, 19:38
x4

Re: Linux Support (Beta)

Post by Alm888 » Sat, 24. Oct 20, 22:29

timon37 wrote:
Sat, 24. Oct 20, 17:57
It should, although it has to be passed to the binary and I'm not sure if the gog scripts pass commandline options.
You could just edit them though.

Wait not sure if I understood properly, you mean that normally it runs fine but if you run it with "-logfile something.txt" it hangs?
Or do you mean that the game normally just hangs for you?
In fact, I do not use GOG scripts at all as more often than not they get in the way by wrongly substituting system libraries with GOG-bundled ones. I prefer to utilize my own scripts. In this case it is:

Code: Select all

#!/bin/bash
./X4 -skipintro 1>/dev/null 2>&1
and it works just fine.

However, if I add "-logfile something.txt" to it like this:

Code: Select all

#!/bin/bash
./X4 -skipintro -logfile something.txt 1>/dev/null 2>&1
it hangs.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: Linux Support (Beta)

Post by timon37 » Mon, 26. Oct 20, 18:15

@Chocrates

Ok, that's actually good it should be fixed in the next update.


@Alm888

Huh that's really strange... certainly not expected.
Is it the same if you remove " 1>/dev/null 2>&1 " ?

FlynTie
Posts: 36
Joined: Wed, 12. Dec 18, 01:42

Re: Linux Support (Beta)

Post by FlynTie » Mon, 26. Oct 20, 18:44

timon37 wrote:
Mon, 26. Oct 20, 18:15
Huh that's really strange... certainly not expected.
Is it the same if you remove " 1>/dev/null 2>&1 " ?
Yes, happens for me too. No matter how i pass the -logfile parameter the game hangs right after i launch it, funny enough the log file gets written in "$HOME/.config/EgoSoft/X4/"

Here's my System Specs if needed.
Game Version: GoG 3.30 (406216)

Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.16-2-MANJARO
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4690K CPU @ 3.50GHz
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce GTX 1060 6GB/PCIe/SSE2
Nvidia Driver: 455.28 (Proprietary)
Last edited by FlynTie on Mon, 26. Oct 20, 22:22, edited 1 time in total.

Chocrates
Posts: 8
Joined: Sat, 17. Oct 20, 23:19

Re: Linux Support (Beta)

Post by Chocrates » Mon, 26. Oct 20, 19:49

timon37 wrote:
Mon, 26. Oct 20, 18:15
@Chocrates

Ok, that's actually good it should be fixed in the next update.


@Alm888

Huh that's really strange... certainly not expected.
Is it the same if you remove " 1>/dev/null 2>&1 " ?
Great to hear. I'm not a graphics programmer but do you have a TL;DR of what happened?

<3 Thank you so much for taking the time to help.

Alm888
Posts: 487
Joined: Sat, 14. Sep 19, 19:38
x4

Re: Linux Support (Beta)

Post by Alm888 » Mon, 26. Oct 20, 20:14

timon37 wrote:
Mon, 26. Oct 20, 18:15
@Alm888

Huh that's really strange... certainly not expected.
Is it the same if you remove " 1>/dev/null 2>&1 " ?
Yes, I've tried invoking X4 directly from a terminal without any additional keys (just "$ ./X4 -logfile something.txt").
The only thing written in the stdout/stderr is:

Code: Select all

./X4: /lib64/liblber-2.4.so.2: no version information available (required by ./X4)
./X4: /lib64/libldap_r-2.4.so.2: no version information available (required by ./X4)
and this is normal (does not prevent the game from launch in normal circumstances).

Also, I can confirm that the "whatever.txt" file is created and contains:

Code: Select all

Logfile started, time Tue Oct 27 00:09:21 2020
[General] 0.00 'GeForce GTX 1660 Ti' NVIDIA-driver v450.66.0 (Vulkan 1.2.133) check=1
[General] 0.00 'GeForce GTX 1660 Ti' NVIDIA-driver v450.66.0 (Vulkan 1.2.133) check=1
and that's it.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: Linux Support (Beta)

Post by timon37 » Tue, 27. Oct 20, 14:19

@Chocrates

I made some changes to better check for gpu compatibility, mostly for cases of multiple nvidia gpus (these could cause trouble sometimes).
Unfortunately it was bugged and if there's a dedicated card + intel gpu present it'll cause problems (both on windows and linux).

Alm888
Posts: 487
Joined: Sat, 14. Sep 19, 19:38
x4

Re: Linux Support (Beta)

Post by Alm888 » Wed, 28. Oct 20, 05:12

timon37 wrote:
Tue, 27. Oct 20, 14:19
@Chocrates

I made some changes to better check for gpu compatibility, mostly for cases of multiple nvidia gpus (these could cause trouble sometimes).
Unfortunately it was bugged and if there's a dedicated card + intel gpu present it'll cause problems (both on windows and linux).
The thing is, I have a single GPU (dedicated GTX 1660Ti) and no integrated video in CPU (Ryzen 5 3600).

Chocrates
Posts: 8
Joined: Sat, 17. Oct 20, 23:19

Re: Linux Support (Beta)

Post by Chocrates » Mon, 2. Nov 20, 13:31

timon37 wrote:
Tue, 27. Oct 20, 14:19
@Chocrates

I made some changes to better check for gpu compatibility, mostly for cases of multiple nvidia gpus (these could cause trouble sometimes).
Unfortunately it was bugged and if there's a dedicated card + intel gpu present it'll cause problems (both on windows and linux).
Just wanted to let you know the beta for the new patch works great!

CBJ
EGOSOFT
EGOSOFT
Posts: 51928
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Linux Support (Beta)

Post by CBJ » Tue, 3. Nov 20, 15:47

That hotfix update is now on full public release.

Buzz2005
Posts: 2200
Joined: Sat, 26. Feb 05, 01:47
x4

Re: Linux Support (Beta)

Post by Buzz2005 » Thu, 19. Nov 20, 20:13

recently installed ubuntu and tried to play x4, everything works expect my xbox controller cant "scroll" I have to press up or down arrow individually to move item by item ( for example in the property menu ) but on windows I just press and hold up or down arrow and it scrolls/moves until the end

its a xbox 360 wireless controller, can ego please try it out and if everything is alright maybe your linux guru or anybody else can give me a hint on what I did wrong

the problem is the same on 3.3 and new 4.0 beta 1
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: Linux Support (Beta)

Post by timon37 » Wed, 25. Nov 20, 14:45

button repeat will be fixed in some beta update (not sure which exactly).

User avatar
Moderato_bei_X
Posts: 31
Joined: Tue, 28. Oct 03, 15:12
x4

Re: Linux Support (Beta)

Post by Moderato_bei_X » Mon, 7. Dec 20, 02:22

One thing that makes playing less enjoyable is the game re-initializing the graphics upon each window minimization.

This re-initialization takes a pretty long amount of time (I haven't timed it exactly, but maybe a minute on my system with most graphic settings turned up to the max, with the exception of anti aliasing which is set to some 2x method). Usually, the game is showing the X4 Foundations splash screen during that time.

Naturally, this is necessary whenever a save game is loaded and everything in the scene rendered, but it also has happened every time I tabbed out of the game, i.e., switched focus to another window.

It's possible to work around that by exporting the environment variable "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" with a value of 0, but this doesn't squelch all occurrences.

I typically make heavy use of virtual desktops and switch between them pretty often. The game always runs on a virtual desktop not including my browsers, so I switch between them quite often whenever I want to look something up.

Now, the way virtual desktops work on UNIX-based systems is pretty simple, but also nifty: window managers typically hide applications that are not part of the target virtual desktop and - crucially - all those windows are minimized (or, in X11 parlance, unmapped). Boom, graphics re-initialization once I get back to the virtual desktop with the game.

To this day, I haven't seen any game re-initializing its graphics output after a minimize cycle. Everything else just continues to render the graphics.

Is there any chance you'll refactor the X4 code to behave the same? Is there any reason why it was implemented this way? I mostly hope that there's no real technical reason for it, but rather over-prudence to avoid graphical glitches (like... random video memory content?), which shouldn't be a real problem in practice.

Edit: to be fair, I could employ another work around and tell my WM to always include the game on all virtual desktops, but I still find its behavior highly unusual and would rather have it changed.
Course.setCourse[_%e00FF00FF00FF00FFset%ei]
.byOS[4D6963726F66742057696E646F777320544520286329032313135]
00FFl_ified00FF00FF00FF{fail%re}

DKay47
Posts: 11
Joined: Thu, 7. Jul 11, 15:19
x4

Re: Linux Support (Beta)

Post by DKay47 » Mon, 7. Dec 20, 04:06

mAritz wrote:
Sat, 8. Jun 19, 09:33
mAritz wrote:
Wed, 5. Jun 19, 11:57
I have to disable my secondary display to get the game to start, otherwise I get this:

Code: Select all

./testandlaunch: line 14:  6268 Segmentation fault      (core dumped) ./X4 "$@" 2>&1
Once I disable the second monitor it starts up fine.
I'm happy to report that updating from kernel 5.0 to 5.1 appears to have fixed this issue for me. :)
Bumping an old bug report to say that I'm affected by the same issue here. I only recently came back to X4 after playing it (successfully) at launch but now, this is what I get:

Code: Select all

/mnt/nvme/Games/steamapps/common/X4 Foundations/testandlaunch: line 14: 488325 Segmentation fault      ./X4 "$@" 2>&1
I have a somewhat similar setup: Nvidia drivers and mismatched monitors (an old, 720p TV screen plugged in a DP and a newer 1080p monitor plugged in the HDMI port) - from the BIOS up until the X server boots up, the "wrong" monitor is selected as default.

When I launch the game, it immediately segfaults. Running the 5.9.11-zen kernel.


Surprisingly, trying to launch in compatibility mode (using proton & proton eggroll) leads to an immediate crash as well

Some additional information

GPU driver is 455.46.02
vulkaninfo: https://pastebin.com/bdjbCmkv
full steam startup log: https://pastebin.com/91iTFrHZ

If it's any clue, I can sometimes see a black box flicker before the crash, and it's positioned halfway between the two monitors. I tried messing around with fullscreen/windowed options from the config file to no avail

Post Reply

Return to “X4: Foundations - Technical Support”