Linux Support

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

Moderator: Moderators for English X Forum

xAix1999
Posts: 50
Joined: Mon, 24. Feb 25, 04:38

Re: Linux Support

Post by xAix1999 »

whats the axis minimum and maximum?
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

I tested on Windows with a different joystick (though from the same company) and the issue persisted so it seems like it might just be an issue with how the game handles throttle deadzones in general. If I can fix it in linux then that would be great, but I think it would still merit a separate issue.
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

xAix1999 wrote: Wed, 21. May 25, 09:30 whats the axis minimum and maximum?
0 for forward and 65635 for back, however I believe that evdev normalizes all inputs to -32767 and 32767 which it seems to be doing correctly.
xAix1999
Posts: 50
Joined: Mon, 24. Feb 25, 04:38

Re: Linux Support

Post by xAix1999 »

did you happen to change the dead zone settings and restart the game and or possibly your system?

evdev interacts directly with the kernel so i would change settings and reboot.
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

xAix1999 wrote: Wed, 21. May 25, 20:51 did you happen to change the dead zone settings and restart the game and or possibly your system?

evdev interacts directly with the kernel so i would change settings and reboot.
I've restarted multiple times since making the changes.
xAix1999
Posts: 50
Joined: Mon, 24. Feb 25, 04:38

Re: Linux Support

Post by xAix1999 »

set the throttle in the "back" position and then make the changes. i would probably set the minimum to 0 and maximum to 32k and change the dead zone to 0 instead of it probably going to 16k. you will probably need to make an udev rule to make the changes at boot. though the udev rule will probably be a dirty hack type of solution.
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

xAix1999 wrote: Wed, 21. May 25, 23:43 set the throttle in the "back" position and then make the changes. i would probably set the minimum to 0 and maximum to 32k and change the dead zone to 0 instead of it probably going to 16k. you will probably need to make an udev rule to make the changes at boot. though the udev rule will probably be a dirty hack type of solution.
I don't think I can change the min/max that evdev reports to X4, nor the values that my throttle reports to evdev, I can only change how evdev maps the throttle's range to evdev's standard range (-32k to 32k). However this did give me an idea, which is if I set the max value in evdev to twice the actual max, then after evdev it maps to exactly in the middle. Now with bidirectional throttle and it works as intended (back = 0 throttle, forward = max throttle, with some deadzone around 0), if a little hacky.
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

I also decided that a systemd user service was a lot easier than a udev rule since it'll always be plugged in anyways, so after manually editing the saved calibration file, this is what I ended up with:

Code: Select all

~/.config/evdev-joystick-calibration/ThrustmasterTWCSThrottle.json

Code: Select all

{"2": {"minimum": 0, "maximum": 131070, "analog": "ABS_Z", "flat": 600}, "5": {"minimum": 0, "maximum": 1023, "analog": "ABS_RZ", "flat": 0}, "7": {"minimum": 0, "maximum": 1023, "analog": "ABS_RUDDER", "flat": 0}, "17": {"minimum": -1, "maximum": 1, "analog": "ABS_HAT0Y", "flat": 0}, "16": {"minimum": -1, "maximum": 1, "analog": "ABS_HAT0X", "flat": 0}, "1": {"minimum": 0, "maximum": 1023, "analog": "ABS_Y", "flat": 32}, "0": {"minimum": 0, "maximum": 1023, "analog": "ABS_X", "flat": 32}}

Code: Select all

~/.config/systemd/user/evdev-joystick-cal.service

Code: Select all

[Unit]
Description=Load Joystick Calibration for evdev-joystick
After=graphical.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/evdev-joystick-calibration -l

[Install]
WantedBy=default.target
xAix1999
Posts: 50
Joined: Mon, 24. Feb 25, 04:38

Re: Linux Support

Post by xAix1999 »

excellent! let me know if it works as intended.
LazyDope
Posts: 19
Joined: Thu, 13. Jul 23, 03:48
x4

Re: Linux Support

Post by LazyDope »

Seems to be, thanks for helping out!
xAix1999
Posts: 50
Joined: Mon, 24. Feb 25, 04:38

Re: Linux Support

Post by xAix1999 »

no problem friend
RPINerd
Posts: 74
Joined: Fri, 8. Mar 19, 20:21
x4

Re: Linux Support

Post by RPINerd »

I know insanely general, but anything one can do specifically to help?

I've been running the game on Linux since launch and had nothing but good experiences, would love to just be able to give back in some way :D
User avatar
EGO_Aut
Posts: 2395
Joined: Mon, 2. Dec 19, 19:40
x4

Re: Linux Support

Post by EGO_Aut »

Installed pop!_os linux, steam and x4
Testrun x4 (after 45min shader post processing) was sucesful!

I want to transfer my saves, searched in - (personal directory) + "ctrl+h" .config - can not find egosofts x4 directory :gruebel:

What am i doing wrong? - Warning im linux-noob

Edit: FOUND :!:

personal directory/.var/app/com,v,,,team/.config/Egosoft/x4/xxnumbersxx/save
xrogaan
Posts: 214
Joined: Tue, 31. May 11, 20:27
x4

Re: Linux Support

Post by xrogaan »

EGO_Aut wrote: Sat, 26. Jul 25, 15:33 Installed pop!_os linux, steam and x4
Testrun x4 (after 45min shader post processing) was sucesful!

I want to transfer my saves, searched in - (personal directory) + "ctrl+h" .config - can not find egosofts x4 directory :gruebel:

What am i doing wrong? - Warning im linux-noob

Edit: FOUND :!:

personal directory/.var/app/com,v,,,team/.config/Egosoft/x4/xxnumbersxx/save
Huh, weird. Are you using steam's flatpak?
CPU: 8-core AMD Ryzen 7 5700X (-MT MCP-); 32GiB ram; GPU: AMD Radeon RX 6600; GNU/Linux Devuan
User avatar
EGO_Aut
Posts: 2395
Joined: Mon, 2. Dec 19, 19:40
x4

Re: Linux Support

Post by EGO_Aut »

xrogaan wrote: Sat, 26. Jul 25, 19:03
EGO_Aut wrote: Sat, 26. Jul 25, 15:33 Installed pop!_os linux, steam and x4
Testrun x4 (after 45min shader post processing) was sucesful!

I want to transfer my saves, searched in - (personal directory) + "ctrl+h" .config - can not find egosofts x4 directory :gruebel:

What am i doing wrong? - Warning im linux-noob

Edit: FOUND :!:

personal directory/.var/app/com,v,,,team/.config/Egosoft/x4/xxnumbersxx/save
Huh, weird. Are you using steam's flatpak?
I dont know, there was a install next to a steam symbol, and i installed it default without changes.

BTW: I installed X4 and an old Medival II game.
X4 starts and runs fine, i appreciate 10-15 % more (old win10: ~20 fps vs linux: ~25 fps without graphic problems). I am happy :D https://youtu.be/ZR-ObdcEGQk - @06:40 old win10 rig - no video under linux atm, sry
But i did not get Medival II started, although there is a "start" in the steam app for this game :gruebel:

Return to “X4: Foundations - Technical Support”