berarma / ffbtools

Set of tools for FFB testing and debugging on GNU/Linux
GNU General Public License v3.0
56 stars 10 forks source link

Issue when using ffbwrap command #15

Closed mokiman210 closed 4 years ago

mokiman210 commented 4 years ago

Game: Dirt Rally 2.0 Proton 4.2-9 Logitech G-29 in PS3 mode Mint 19.3 Cinnamon kernel: 5.0.0-37-generic

The new-lg4ff-0.2b driver has been compile and installed. It shows that it is active by lsmod when the wheel is plugged in. I extracted ffbtools to /home/user/drivers folder which created the ffbtools-master directory under that. I compiled it with the 'make' command and no errors were returned. I then tried to run the ffbwrap script from the ffbtools-master folder as described in the ffbwrap.md doc like so: ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- (no quotes). I immediately get: "bash: syntax error near unexpected token `newline'". What am I doing wrong? Thanks!

jotomo commented 4 years ago

You omitted the command part at the end it seems. To run DR2 through Steam, follow the last example in the referenced file.

mokiman210 commented 4 years ago

The command was actually there when I submitted the post, but I forgot to put quotes around the less-than, greater-than brackets ("< >") so it didn't show up. The command I used was correct (as far as I can tell) and did include the ("").

Edit: the editor appears to leave the symbols out even when they're in quotes... sometimes.

jotomo commented 4 years ago

The <command> is a placeholder for the command the wrapper shall start. However, for Dirt Rally 2.0, you need to use Steam to start the game. To that end, open the game's properties, click Set launch options and enter this (replace user with your actual user):

/home/user/drivers/ffbwrap-master/ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick  -- %command%

This will make Steam invoke the wrapper, which in turn will call %command% which Steam will substitute with the game's binary.

mokiman210 commented 4 years ago

Yes, I've already tried placing the call to the script exactly like how you describe (with the correct user name, of course) in the game's launch options in Steam and nothing happened. Ffb still does not work. But shouldn't the script at least function from the terminal without returning a bash syntax error? Why is that happening?

berarma commented 4 years ago

@mokiman210, the error you describe in your first message is most probably because you put the command inside <>. What happens when you don't use the <> characters in the command line?

In the last example from @jotomo, it's not just the user name you have to change but the full command path to match where ffbwrap is in your system.

Please, check everything above and if it still doesn't work please post the full output from the make command, and also from the command: bin/ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- bin/ffbplay

mokiman210 commented 4 years ago

Thank you for responding. Yes, I am aware that the command in set Launch Options has to be the full path. I will post the results of your suggestions as soon as I can tomorrow. Thanks!

mokiman210 commented 4 years ago

In the terminal, when I executed the command: bin/ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- command (from the ffbtools-master directory) I do not get the bash syntax error or any other message but nothing happens. The force feedback does not turn on.

If I enter bin/ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- bin/ffbplay I get:

ERROR: ld.so: object '/home/curt/Documents/Logitech_G29_Driver/ffbtools-master/bin/../build/libffbwrapper-i386.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Syntax: bin/ffbplay <device> (and nothing happens).

When I execute "make" now from the ffbtools-master directory I get: make: Nothing to be done for 'all'

I looked through the logs for the terminal output for when I first executed the "make" command but was unable to locate anything.

Should I be substituting something for "%command%" when I enter the ffbwrap command in the "Set Launch Options" in Steam? This is unclear to me.

Thanks!

Edit: I also wanted to mentioned that I noticed today that if the wheel is plugged in to the USB port when I boot the machine, force feedback is turned on and working when I get to the desktop. FFB stays on until I start DR2 then drops out. If I plug the wheel in after I boot and get to the desktop the wheel initializes normally but there is no ffb.

berarma commented 4 years ago

Should I be substituting something for "%command%" when I enter the ffbwrap command in the "Set Launch Options" in Steam? This is unclear to me.

Yes, you must use "%command%" as the command (without the quotes but with the %). Evertyhing up to this point sounds right. There's no issue.

Edit: I also wanted to mentioned that I noticed today that if the wheel is plugged in to the USB port when I boot the machine, force feedback is turned on and working when I get to the desktop. FFB stays on until I start DR2 then drops out. If I plug the wheel in after I boot and get to the desktop the wheel initializes normally but there is no ffb.

This seems unrelated. You should look into dmesg and lsmod to see how the module is loaded.

mokiman210 commented 4 years ago

Here is the exact text I enter into "Set Launch Options" in Steam: /home/curt/Documents/Logitech_G29_Driver/ffbtools-master/bin/ffbwrap --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- %command% When I start the game force feedback does not get enabled. Any idea why it isn't working?

leillo1975 commented 4 years ago

I see also your problem in the Proton Issue. It's very strange. Check the configuration in game. Did you still using Proton 4.2-9 ? Use the last version of proton

berarma commented 4 years ago

I see you're using an old Proton version. Please, upgrade.

Closing since there's no issue in ffbwrap.

mokiman210 commented 4 years ago

Where do you see I'm not using the latest version of Proton? I see that Proton 4.2-9 is selected in the game properties. Is that not the latest version? It's a new (3 weeks) installation and Proton 4.2-9 is the latest according to Steam, I believe.

leillo1975 commented 4 years ago

The last version is 4.11-12

berarma commented 4 years ago

Some serious FFB issues were fixed in 4.11-10.

berarma commented 4 years ago

Since you seem to still have problems with the latest Proton version let's move the discussion here.

Which Proton version are you using now?

What does it happen exactly? Does the game launch? Try the following in the Steam launcher options: /home/curt/Documents/Logitech_G29_Driver/ffbtools-master/bin/ffbwrap --logger=/home/curt/Documents/dr2 --update-fix /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick -- %command%

This should create a file at /home/curt/Documents/dr2-*

Could you attach this file?

mokiman210 commented 4 years ago

dr2-20200118140203.log Proton version is now 4.11-12. The game starts and works perfectly with the wheel except for the lack of force feedback. Thank you for continuing to assist me.

berarma commented 4 years ago

The update fix is in effect but the game isn't sending any FFB to the wheel. Most probably there's something wrong with the game configuration. Check that the FFB is correctly configured in-game.

mokiman210 commented 4 years ago

There seems to be something wrong with Proton 4.11-12, possibly corrupted. I thought the wheel was working in the game with Proton 4.11 earlier but when I test it now, the bindings are messed up and weird things are happening (can steer right but not left). When I look at "Options&Extras/Input/Connected Device - Steering Wheel/Advanced Settings, "Device Type" is now grayed out and input bindings are scrambled. Wheel calibration ignores some of the inputs like throttle and clutch. And, of course, ffb is non-functional. If I run the game under Proton 4.2-9 the wheel works properly, just no ffb.

So, it looks like I may have to do a reinstall but the problem clearly is not the ffb driver. I appreciate your assistance and patience with me on this issue. Thanks again!

berarma commented 4 years ago

Honestly I think there's something wrong in your system. Maybe reinstalling Steam will solve it. Since Steam/Proton is pretty self-contained it usually just works or doesn't work at all, something in between isn't that common. If it doesn't work you can try reporting to the Proton project or use the Steam forums, you'll find more knowledgeable people there.

Also, try the wheel with some other software to make sure that's not the problem. Sometimes a loose wire,some USB connectors or a hub can make it fail.

Since the game can work with FFB just using the driver in the kernel and ffbwrap, I would recommend trying it this way. When you get it working you can try new-lg4ff for some improvement.

I hope you can fix it.