1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Workaround to get FFB to work on Linux + Proton

Discussion in 'General Discussion' started by BraindeadBZH, Aug 6, 2023.

  1. BraindeadBZH

    BraindeadBZH
    Expand Collapse

    Joined:
    May 2, 2016
    Messages:
    11
    Hello!

    I found a workaround to get FFB working on Linux with latest versions of Proton.
    I only tested with my Logitech G920 and Proton 8, but if you go to the FFB settings and change the Update Type to Full it seems it solves all FFB issue I had previously.
     
    • Like Like x 2
  2. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    Huh, I had no idea Proton didn't correctly emulate FFB, but that workaround is surprising. Thanks for sharing.
    What issues did you have btw?
     
  3. lightwo

    lightwo
    Expand Collapse

    Joined:
    Nov 14, 2023
    Messages:
    2
    Thank you! This fixed it for me as well.

    In my case, FFB was completely absent while driving until I changed the setting as per the OP.

    Logitech G29 (PS3 mode) with new-lg4ff DKMS module (compiled from git). I believe I was using the latest version of Proton during testing, though I will update the post when I make sure and may test the native version later.
     
  4. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    Was there any relevant logs coming from beamng while the FFB was missing? This sounds like possibly a bug in Proton, but I'm curious to see if beamng managed to the detect the issue or not.
     
  5. lightwo

    lightwo
    Expand Collapse

    Joined:
    Nov 14, 2023
    Messages:
    2
    I attached the log, but it doesn't seem like anything stands out.
     

    Attached Files:

  6. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    Yeah beamng does not encounter anything remarkable during ffb initialization. This does look like some sort of bug in Proton.

    If you want to report this issue to Proton people, a clear hint to them will be that this in-game setting ends up controlling whether DIEP_START flag is passed to the SetParameters() call of the IDirectInputEffect.

    On Windows, I've only seen one case where Full update type was needed: it was an old version of the firmware of a particular steering wheel model - the manufacturer fixed it and regular ffb update type can be used now.
     
    • Like Like x 1
  7. BraindeadBZH

    BraindeadBZH
    Expand Collapse

    Joined:
    May 2, 2016
    Messages:
    11
    Hello,

    Sorry for the late reply, just realized there were answers in this thread.

    Yes the symptoms were like @lightwo described, absolutely 0 FFB, it's really like the motor is completely off.
    The issue appeared in later versions of Proton (version > 6.3-8).
    Before FFB was working but not properly (weird behaviors, including sudden feedback in opposite direction, not accurate to simulation, ...)
    With recent Proton versions and Full Update, FFB works great.
     
  8. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    Thanks for the additional clarification. Just my 2 cents, but for the benefit of all Linux users that are running BeamNG.drive through Proton, I would advice you report your issue to the Proton team, maybe they can fix the problem :)
     
  9. leillo1975

    leillo1975
    Expand Collapse

    Joined:
    Feb 12, 2021
    Messages:
    15
    Hi all.
    I just talked with Berarma, the creator of Oversteer (steering wheel config app) and the Linux Logitech driver new-lg4ff , and he said me that FFB updates are sent but no "PLAY" command is sent for the steering wheel to execute them.

    I don't know if I should mention this here, but the native version of BeamNG hasn't worked on my computer for some time. When you are loading the stage the application crashes.
     
  10. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    I'm not sure what a "PLAY" command is, does he mean "start" instead of "PLAY"? If not, can you please ask for a link to documentation about "PLAY"?
    Assuming he meant "start", then that only need to be called once when creating the effect, and later updates to the effect do not, in practice (in all the hardware that we've seen), require the effect to be restarted. In the extremely few/buggy cases where that's needed, we offer the aforementioned Update Type:Full dropdown in our Options menu (which forces this restart via the DIEP_START flag).
     
  11. leillo1975

    leillo1975
    Expand Collapse

    Joined:
    Feb 12, 2021
    Messages:
    15
    You should get in touch with him ( https://github.com/berarma ), I am just a mere messenger who barely understands what he is talking about.
     
  12. Louie's Workshop

    Louie's Workshop
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    3,016
    Sort of a bump here, but I wanted to say Thank you. This method still works. I was scratching my head with this one. I am using Arch btw)
     
  13. Katharine Chui

    Katharine Chui
    Expand Collapse

    Joined:
    Aug 20, 2024
    Messages:
    2
    Hi @stenyak ,

    I did a bit of a trace on the "Fast" update type on proton, on steam beamng (0.32.5.0 according to the launcher), there's a lack of IDirectInputEffect::Start and I don't think I see DIEP_START used with IDirectInputEffect::SetParameters

    Do windows drivers play effects on SetParameters even without DIEP_START? Or is BeamNG starting the effect by some other ways in "Fast" update type?

    ref:https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ee417952(v=vs.85)
    ref:https://gitlab.winehq.org/wine/wine...6efde38bd88e/dlls/dinput/joystick_hid.c#L2531

    Thanks in advance
     

    Attached Files:

  14. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    For anyone following this thread, after some conversations (with @Katharine Chui and others, in discord), I've committed a potential fix, by forcing a call to start() when an effect is created, rather than a conditional call when it's not already playing. Unless some bug is discovered during internal testing, this change will be included in v0.33, and hopefully that solves the problem :)
     
    • Like Like x 3
    • Agree Agree x 1
  15. Louie's Workshop

    Louie's Workshop
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    3,016
    Awesome! Thank you.
     
  16. Katharine Chui

    Katharine Chui
    Expand Collapse

    Joined:
    Aug 20, 2024
    Messages:
    2
    @stenyak Thank you so much for fixing the issue, it just works now on 0.33.1.0!

    For those who are interested, I've made a bug entry regarding wine's always report playing on IDirectInputEffect::GetEffectStatus' behavior on linux over at https://bugs.winehq.org/show_bug.cgi?id=57085#c0 . If I read the code correctly, wine relies on SDL for force feedback, and since SDL linux does not support querying effect status (likely due to https://bugzilla.kernel.org/show_bug.cgi?id=219189 , the lack of an interface for it in the first place), wine sets all effects as playing on linux as a result.

    Once again thank you so much for the wine specific work around!
     
  17. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,014
    You're welcome. And thanks for trying to get this fix at the real source too!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice