X4, Linux, Extreme 3D, Not Detecting Some Axes

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

Moderator: Moderators for English X Forum

Post Reply
droidilate
Posts: 7
Joined: Sat, 28. Apr 18, 03:05

X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by droidilate » Sun, 7. Feb 21, 00:41

Version: Steam, 3.3 English (Collector's Edition purchased 2/6/2021)
OS: Linux (Mint Cinnamon 20)
Mods: None
Start: Initial test with "flight tutorial" start
Problem: Joystick configuration issue
Joystick: Logitech Extreme 3D Pro

X4 does not seem to be able to detect my slider (I use it for the throttle) or the stick-twist (I use for the rudder).

I have installed and tested my joystick using jstest-gtk and the app successfully detects all of the buttons and axes on my stick. So there's no hardware issue here.

I've even tried experimenting with different, manual entries into the inputmap.xml files. In some cases, the control configuration "looks" like it should work (by showing the text "slider" in the throttle slot on the config screen or some other text), but still it does nothing in game when I try to use it. Some of the ones I used were:

<range id="INPUT_RANGE_THROTTLE" source="INPUT_SOURCE_JOYAXES" code="INPUT_JOYAXIS_Z"/>

<range id="INPUT_RANGE_THROTTLE" source="INPUT_SOURCE_JOYAXES" code="INPUT_JOYAXIS_SLIDER1"/>
<range id="INPUT_RANGE_THROTTLE" source="INPUT_SOURCE_JOYAXES" code="INPUT_JOYAXIS_RX" sdl="true"/>

:cry:


Code: Select all

System:    Kernel: 5.4.0-58-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.7 
           wm: muffin dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: Gigabyte product: N/A v: N/A serial: <filter> 
           Mobo: Gigabyte model: Z170X-Gaming 7 v: x.x serial: <filter> UEFI: American Megatrends 
           v: F4 date: 09/01/2015 
CPU:       Topology: Quad Core model: Intel Core i5-6600K bits: 64 type: MCP arch: Skylake-S 
           rev: 3 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 27999 
           Speed: 800 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
Graphics:  Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] vendor: eVga.com. driver: nvidia 
           v: 455.38 bus ID: 02:00.0 chip ID: 10de:1c03 
           Display: x11 server: X.Org 1.20.8 driver: nvidia 
           unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2 v: 4.6.0 NVIDIA 455.38 
           direct render: Yes 
Audio:     Device-1: NVIDIA GP106 High Definition Audio vendor: eVga.com. driver: snd_hda_intel 
           v: kernel bus ID: 02:00.1 chip ID: 10de:10f1 
           Sound Server: ALSA v: k5.4.0-58-generic 
Network:   Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: 3.2.6-k port: f000 
           bus ID: 00:1f.6 chip ID: 8086:15b8 
           IF: enp0s31f6 state: down mac: <filter> 
           Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: d000 
           bus ID: 05:00.0 chip ID: 8086:24fd 
           IF: wlp5s0 state: up mac: <filter> 
           Device-3: Qualcomm Atheros Killer E2400 Gigabit Ethernet vendor: Gigabyte driver: alx 
           v: kernel port: c000 bus ID: 06:00.0 chip ID: 1969:e0a1 
           IF: enp6s0 state: down mac: <filter> 
Drives:    Local Storage: total: 2.40 TiB used: 533.04 GiB (21.7%) 
           ID-1: /dev/sda vendor: Seagate model: ST3640323AS size: 596.17 GiB speed: 3.0 Gb/s 
           serial: <filter> 
           ID-2: /dev/sdb vendor: Western Digital model: WD1001FALS-00J7B1 size: 931.51 GiB 
           speed: 3.0 Gb/s serial: <filter> 
           ID-3: /dev/sdc vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
           speed: 6.0 Gb/s serial: <filter> 
           ID-4: /dev/sdd vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
           speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 456.96 GiB used: 97.43 GiB (21.3%) fs: ext4 dev: /dev/sdd2 
Sensors:   System Temperatures: cpu: 45.0 C mobo: 29.8 C gpu: nvidia temp: 54 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 10% 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 
           1: deb https: //dl.winehq.org/wine-builds/ubuntu/ focal main
           Active apt repos in: /etc/apt/sources.list.d/lutris-team-lutris-focal.list 
           1: deb http: //ppa.launchpad.net/lutris-team/lutris/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main
           2: deb http: //archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http: //archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http: //archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/steam.list 
           1: deb [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
           2: deb-src [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
Info:      Processes: 256 Uptime: 8h 51m Memory: 31.32 GiB used: 3.54 GiB (11.3%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client 
           inxi: 3.0.38 

Roeleveld
Posts: 403
Joined: Tue, 17. Feb 04, 23:34
x4

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Roeleveld » Mon, 8. Feb 21, 09:36

Not sure if this is the issue you are seeing, but did you disable the "gamepad" setting?
The default setting does not work very well with real joysticks

spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by spookywatcher » Mon, 8. Feb 21, 18:13

You are not alone. I have been begging and pleading with them to fix this issue for a long time. But they refuse. This renders this game useless for me.

See my thread here it explains it all: viewtopic.php?f=180&t=429526&p=5000803#p5000803

It all has to do with someone, at some point, updated SDL2 to include the Logitech Extreme 3D pro in the linux section of gamepad settings. I successfully petitioned the Devs of SDL2 to remove the offending line. So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game. So unless the devs at ego update it...it will be forever screwed.

And again...I have been begging them since v 2.6 to fix this.

droidilate
Posts: 7
Joined: Sat, 28. Apr 18, 03:05

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by droidilate » Mon, 8. Feb 21, 23:15

spookywatcher wrote:
Mon, 8. Feb 21, 18:13
You are not alone. I have been begging and pleading with them to fix this issue for a long time. But they refuse. This renders this game useless for me.

See my thread here it explains it all: viewtopic.php?f=180&t=429526&p=5000803#p5000803

It all has to do with someone, at some point, updated SDL2 to include the Logitech Extreme 3D pro in the linux section of gamepad settings. I successfully petitioned the Devs of SDL2 to remove the offending line. So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game. So unless the devs at ego update it...it will be forever screwed.

And again...I have been begging them since v 2.6 to fix this.

Wow, that thread is a bit discouraging.

Well, this is another Linux user making the same request to the folks at Egosoft. Please fix the Logitech Extreme control and see if you can't squeeze it into one of your next releases? With any luck it'll be a two point story to copy in a new library to your build :P.

In the mean time, I have found that if you are using Steam, you can map the joystick's axes to a gamepad's axes and then they will be forwarded into X4 and work "fairly" well. However, it can occasionally be quirky. Sometimes the dead zones don't seem to work or a button can get stuck, but it's better than nothing (or trying to fly with a mouse or gamepad, yuck).

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

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Alm888 » Wed, 10. Feb 21, 18:37

spookywatcher wrote:
Mon, 8. Feb 21, 18:13
So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game.
May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?

Roeleveld
Posts: 403
Joined: Tue, 17. Feb 04, 23:34
x4

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Roeleveld » Wed, 10. Feb 21, 20:50

Alm888 wrote:
Wed, 10. Feb 21, 18:37
spookywatcher wrote:
Mon, 8. Feb 21, 18:13
So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game.
May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?
That will reappear as soon as the game is updated again or steam checks the files.

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

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Alm888 » Wed, 10. Feb 21, 21:03

Roeleveld wrote:
Wed, 10. Feb 21, 20:50
Alm888 wrote:
Wed, 10. Feb 21, 18:37
spookywatcher wrote:
Mon, 8. Feb 21, 18:13
So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game.
May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?
That will reappear as soon as the game is updated again or steam checks the files.
Well, that is Steam's problem, not the game's then. GOG version does not have this issue. Besides, I don't know for sure, but there seem to be a command line functionality in Steam's settings somewhere. Perhaps, the LD_PRELOAD could be applied there.

P.S. The whole deal seems overly dramatic to me. The game is hardly "useless" without a joystick and is perfectly playable with mouse+keyboard. Moreover, the current version is dated 03.11.2020 and the SDL2 v2.0.14 is dated (according to Wikipedia) 21.12.2020, so stating the developers have "refused" to update is a little premature, non? :sceptic:

spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by spookywatcher » Fri, 12. Feb 21, 18:32

Alm888 wrote:
Wed, 10. Feb 21, 21:03
Roeleveld wrote:
Wed, 10. Feb 21, 20:50
Alm888 wrote:
Wed, 10. Feb 21, 18:37

May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?
That will reappear as soon as the game is updated again or steam checks the files.
Well, that is Steam's problem, not the game's then. GOG version does not have this issue. Besides, I don't know for sure, but there seem to be a command line functionality in Steam's settings somewhere. Perhaps, the LD_PRELOAD could be applied there.

P.S. The whole deal seems overly dramatic to me. The game is hardly "useless" without a joystick and is perfectly playable with mouse+keyboard. Moreover, the current version is dated 03.11.2020 and the SDL2 v2.0.14 is dated (according to Wikipedia) 21.12.2020, so stating the developers have "refused" to update is a little premature, non? :sceptic:
I'm trying the GOG version now... And it is still broken. Since version 2.6 And as for "removing" the old version below is a quote from me in my thread about this, so if you have any insight on how to fix it and what I'm doing wrong...I'm all ears! And as for useless...Yes the way I play X4 and all previous X games....It's useless to me without my stick and ch throttle.
spookywatcher wrote:
Sun, 3. Jan 21, 16:33
I feel like I'm finally close to getting X4 to play nice with the Logitech Extreme 3d Pro in Linux.

As mention above I successfully got the Devs of SDL2 to remove the offending line with a bug report. The new version of SDL2 is 2.0.14 and again it looks good.
I have downloaded it and compiled my own version 2.0.14 and did:

Code: Select all

./configure --prefix=/opt/SDL2-2.0.14/
make
sudo make install
I then went into the X4's game library

Code: Select all

/home/thisisme/GOG Games/X4 Foundations/game/lib
and renamed "libSDL2-2.0.so.0" to "libSDL2-2.0.so.0.bak". Launched the game but it didn't work. Ok...it's still using SDL2 version 2.0.10 (because I never uninstalled it). So then I tried to change the Library Path in the testandlaunch.sh located in the game folder to this:

Code: Select all

export LD_LIBRARY_PATH="/opt/SDL2-2.014/"
thinking that was the last key to the puzzle. But unfortunately it was still recognized as a gamepad. I'm missing something simple I feel. Like the lib path or something.

Anyone have any suggestions?

droidilate
Posts: 7
Joined: Sat, 28. Apr 18, 03:05

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by droidilate » Fri, 12. Feb 21, 19:55

Roeleveld wrote:
Wed, 10. Feb 21, 20:50
Alm888 wrote:
Wed, 10. Feb 21, 18:37
spookywatcher wrote:
Mon, 8. Feb 21, 18:13
So SDL2 is fixed. But X4 still uses that old version of SDL2. So it is hard baked into the game.
May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?
That will reappear as soon as the game is updated again or steam checks the files.
What if you replace the SDL2 library and then run the game with Egosoft's "no steam" exe (X4 3.30 Hotfix 2 NoSteam.exe)?

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

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Alm888 » Fri, 12. Feb 21, 21:04

spookywatcher wrote:
Fri, 12. Feb 21, 18:32
I'm all ears!
Does this do the trick?

Code: Select all

$ env LD_PRELOAD=/opt/SDL2-2.0.14/libSDL2-2.0.so.0 LD_LIBRARY_PATH=/opt/SDL2-2.0.14/:$LD_LIBRARY_PATH ./X4
(run directly from the game directory, not using GOG's start.sh script).
Also, remove the libSDL2-2.0.so.0 from the game's "lib" subdirectory, as the binary seems to be hardcoded (RPATH?) to look up in this subdirectory first.

UPDATE: Yes, the X4 binary actually contains RPATH set to "lib".

spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by spookywatcher » Sat, 13. Feb 21, 07:48

Alm888 wrote:
Fri, 12. Feb 21, 21:04
spookywatcher wrote:
Fri, 12. Feb 21, 18:32
I'm all ears!
Does this do the trick?

Code: Select all

$ env LD_PRELOAD=/opt/SDL2-2.0.14/libSDL2-2.0.so.0 LD_LIBRARY_PATH=/opt/SDL2-2.0.14/:$LD_LIBRARY_PATH ./X4
(run directly from the game directory, not using GOG's start.sh script).
Also, remove the libSDL2-2.0.so.0 from the game's "lib" subdirectory, as the binary seems to be hardcoded (RPATH?) to look up in this subdirectory first.

UPDATE: Yes, the X4 binary actually contains RPATH set to "lib".
I will try it first thing in the morning and report back. Very much appreciated!

Roeleveld
Posts: 403
Joined: Tue, 17. Feb 04, 23:34
x4

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by Roeleveld » Sat, 13. Feb 21, 09:40

droidilate wrote:
Fri, 12. Feb 21, 19:55
Roeleveld wrote:
Wed, 10. Feb 21, 20:50
Alm888 wrote:
Wed, 10. Feb 21, 18:37

May I inquire as to what prevents you from removing the "old version" of SDL2 from the game's "lib" subdirectory in order to enforce usage of the "fixed" version? Or using LD_PRELOAD variable to force-load the "fixed" version?
That will reappear as soon as the game is updated again or steam checks the files.
What if you replace the SDL2 library and then run the game with Egosoft's "no steam" exe (X4 3.30 Hotfix 2 NoSteam.exe)?
There is no "NoSteam" exe for Linux.

spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by spookywatcher » Tue, 16. Feb 21, 00:43

Alm888 wrote:
Fri, 12. Feb 21, 21:04
spookywatcher wrote:
Fri, 12. Feb 21, 18:32
I'm all ears!
Does this do the trick?

Code: Select all

$ env LD_PRELOAD=/opt/SDL2-2.0.14/libSDL2-2.0.so.0 LD_LIBRARY_PATH=/opt/SDL2-2.0.14/:$LD_LIBRARY_PATH ./X4
(run directly from the game directory, not using GOG's start.sh script).
Also, remove the libSDL2-2.0.so.0 from the game's "lib" subdirectory, as the binary seems to be hardcoded (RPATH?) to look up in this subdirectory first.

UPDATE: Yes, the X4 binary actually contains RPATH set to "lib".
Well...I've spent hours upon hours trying again to get it to work, but nothing has panned out. No matter what I do it is still unusable and showing it as a gamepad. I appreciate the effort and suggestions. But I have to know when to quit. Guess I'll have to wait until non beta 4.0 is released and hope that the Devs have updated SDL2 in the game. But since they have been completely silent since telling me there's no way I'm assuming that X4 is dead to me. What a colossal waist of time.

spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

Re: X4, Linux, Extreme 3D, Not Detecting Some Axes

Post by spookywatcher » Tue, 16. Feb 21, 05:48

I got it working finally. See my latest post here: viewtopic.php?f=180&t=429526

Post Reply

Return to “X4: Foundations - Technical Support”