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: 68
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

Return to “X4: Foundations - Technical Support”