Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No FFB for me #5

Closed
spocthier83 opened this issue Sep 19, 2020 · 19 comments
Closed

No FFB for me #5

spocthier83 opened this issue Sep 19, 2020 · 19 comments
Labels
help wanted Extra attention is needed

Comments

@spocthier83
Copy link

Hello! I was about to sell my T300RS when I found this project.

I have successfully built and installed both modules in my Linux Mint 20. But, unfortunately, I have no FFB in any game (Assetto Corsa Competizione, Wrekfest, ...).

In other hand, Oversteer software finds successfully the plugged T300RS with theses modules.

What are the requirements to make FFB work?

$ uname -a
Linux spocthier-PC 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

And the last firmware is installed (v31).

I don't know what to say more to help for debugging.

Thx for this!

@Kimplul
Copy link
Owner

Kimplul commented Sep 19, 2020

Heyo, I'm guessing you've unplugged and plugged the wheel back in and possibly restarted your computer?

The wheel's FFB for some godawful reason initializes itself when a certain USBHID request is sent out. On Linux, this request isn't necessarily always sent out because of some driver/device data caching, I believe, so a reboot is usually needed. Windows seems to work somewhat differently, so I guess Thrustmaster didn't think of making the wheel initialize in a sane way.

@spocthier83
Copy link
Author

Indeed, I have rebooted my computer many times since installation. I followed the instructions of course.

In addition, I had to generate certificates (private and public keys) to sign modules in kernel and find the file System.map beforehand to install modules.

Is there a little tool to test FFB directly (i.e. without game)?

@Kimplul
Copy link
Owner

Kimplul commented Sep 19, 2020

Yeah, fftest, should be in the the package joystick. You use it with the command
fftest /dev/input/by-id/usb-Thrustmaster_Thrustmaster_T300RS_Racing_wheel-event-joystick.

Effects 0-3 are currently supported, the last two I haven't really figured out yet. EDIT: Yes I have. I forgot that the last two effects don't have a direction associated with them, and the Windows driver sets the strength of such forces to zero, so I do too. Maybe I should change it, don't quite frankly know.

Right, sort of interesting, I have the newest firmware and I recompiled the module from GitHub. Works on my machine™.

Anycase, could you paste the output in dmesg you get when plugging the wheel in? Also, please include the output of
cat /sys/kernel/debug/hid/0003\:044F\:B66E.0005/rdesc
You'll probably need superuser privileges.

In addition to that, could you explain in detail what the steps you took to compile the kernel were?

For Ubuntu, which you seem to be running, the whole process for me was

  • sudo apt install linux-$(uname -r)-headers
  • make
  • sudo make install
  • sudo depmod -a
  • sudo modprobe hid-tminit
  • sudo modprobe hid-tmt300rs
    And by this point I plugged in my wheel and it started working. The last three commands usually aren't necessary, but if any errors occur it'll be more obvious where and what might've gone wrong.

@spocthier83
Copy link
Author

Thx for your help.

  1. Unfortunately, nothing happens (no FFB) using fftest :
$ fftest /dev/input/by-id/usb-Thrustmaster_Thrustmaster_T300RS_Racing_wheel-event-joystick 
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/by-id/usb-Thrustmaster_Thrustmaster_T300RS_Racing_wheel-event-joystick opened
Features:
  * Absolute axes: X, Y, Z, RZ, Hat 0 X, Hat 0 Y, 
    [27 00 03 00 00 00 00 00 ]
  * Relative axes: 
    [00 00 ]
  * Force feedback effects types: Constant, Periodic, Ramp, Spring, Friction, Damper, Rumble, Inertia, Gain, Autocenter, 
    Force feedback periodic effects: Square, Triangle, Sine, Saw up, Saw down, 
    [00 00 00 00 00 00 00 00 00 00 FF 1F 03 00 00 00 ]
  * Number of simultaneous effects: 16

Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... OK (id 1)
Uploading effect #2 (Spring) ... OK (id 2)
Uploading effect #3 (Damper) ... OK (id 3)
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 4)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 5)
Enter effect number, -1 to exit
0
Now Playing: Sine vibration
Enter effect number, -1 to exit
1
Now Playing: Constant Force
Enter effect number, -1 to exit
3
Now Playing: Damping Condition
Enter effect number, -1 to exit
  1. The output of /sys/kernel/debug/hid/0003:044F:B66E.000A/rdesc is :
    0003:044F:B66E.000A_rdesc.log
    Note that the file name you describe is not exactly the same as mine.

  2. Endly, how I have to built and install your software :

  • built :
$ git clone https://github.com/Kimplul/hid-tmff2.git
$ cd hid-tmff2
$ make
  • install :
$ sudo openssl req -verify -new -nodes -utf8 -sha512 -days 36500 -batch -x509 -config ~/x509.genkey -outform PEM -out /usr/src/linux-headers-5.4.0-47-generic/certs/signing_key.x509 -keyout /usr/src/linux-headers-5.4.0-47-generic/certs/signing_key.pem
$ sudo cp /boot/System.map-5.4.0-47-generic /usr/src/linux-headers-5.4.0-47-generic/System.map
$ sudo make install

At first glance, my system needs signed modules to be inserted into kernel (installation fail otherwise).

Thx a lot for your help!

@Kimplul
Copy link
Owner

Kimplul commented Sep 19, 2020

Are you using SELinux or something similar? You shouldn't have to generate certs or anything like that to insert a kernel module. That being said, certs shouldn't affect the behaviour of the module in any way, so it might be a red herring.

Thanks for the rdesc, yeah, sorry, the path can be a bit different, I should've mentioned that. Could you still show the output of dmesg when you insert the wheel?

Also, just to be on the safe side, you do have your wheel set to ps3?

@berarma
Copy link

berarma commented Sep 19, 2020

$ sudo openssl req -verify -new -nodes -utf8 -sha512 -days 36500 -batch -x509 -config ~/x509.genkey -outform PEM -out /usr/src/linux-headers-5.4.0-47-generic/certs/signing_key.x509 -keyout /usr/src/linux-headers-5.4.0-47-generic/certs/signing_key.pem
$ sudo cp /boot/System.map-5.4.0-47-generic /usr/src/linux-headers-5.4.0-47-generic/System.map

These steps shouldn't be required. You may see a warning about the module not being signed but that's not an issue as far as I know. That message can be ignored.

The complete output of the commands you run could help on the diagnosing. Running script mycommands will write all your following console output to a file named mycommands until you type exit. Attaching this file would provide us with all that is happening in the process of building and installing the module.

The dmesg output after the module is loaded and the device connected has useful information too.

@spocthier83
Copy link
Author

I use Linux Mint 20 "out of box", I don't know if it is a SELinux. Maybe yes.
But I agree with you signing module or not shouldn't be the problem. But I was thinking it was necessary at this moment because it doesn't work. In the other hand, I have now no warning at installation. It's a good thing.

Here are my commands and the output :
commands.log
There is nothing crazy.

And dmesg output with T300RS plugged :
dmesg.log

Hope it will help.

And yes, it is on PS3 side.

@Kimplul
Copy link
Owner

Kimplul commented Sep 20, 2020

Very strange. I just downloaded Mint to test it out and everything works just fine ootb. I did get the same warnings that you also got, but they were just warnings, and I could load the driver just fine. In addition, there's nothing weird or abnormal with the logs you've provided, at least as far as I can see.

I'm just going to fire off some suggestions that may or may not have anything to do with the issue.

  • USB ports. Try all of them. At least on Windows I remember having issues with the wheel whenever I plugged it into a USB2 port, and even their customer service recommended I stick to USB3 if possible. So far I haven't experienced similar issues on Linux, but it's probably worth trying it out.

  • Not a standard T300RS. I know that Thrustmaster has produced some 'special' versions of the T300RS, but I've understood that they all should use the same servo/base, so this might be a longshot. If you happen to have a Windows install nearby, could you show us what Thrustmaster's 'Control Panel' tells you about the wheel? Below is how it looks on my machine.
    image

  • Hardware issue. When did you last use the wheel? Could it have become damaged since you last used it, etc? If you can, please check if the wheel works on Windows.

@spocthier83
Copy link
Author

The wheel works well under Windows. The forces tests are very good.
T300RS Control Panel

As you recommend, I have tried other USB plug too without improvement.

Maybe a difference : I don't plug any pedals to the wheel directly because I use an external controller for my old G25 pedals and shifter (which is not actually connected during my tests).

My T300RS is the only thing I miss from my former Windows life.

@Kimplul Kimplul added the help wanted Extra attention is needed label Sep 21, 2020
@Kimplul
Copy link
Owner

Kimplul commented Sep 21, 2020

The wheel should work with or without pedals just fine, at least it has for me.

Has everything else worked like it should? Can you set the wheel's rotation, the wheel is frictionless when opened in oversteer, but autocentering comes on when you close oversteer?

@Kimplul
Copy link
Owner

Kimplul commented Sep 21, 2020

Quick update, I bought Wreckfest to test out and that game does actually somehow manage to nullify the FFB, even in other games. I'll try to figure this out as soon as possible. I don't know if this is the whole issue or even related, but on the surface it seems like it.

EDIT: Maybe a false alarm, after a quick reboot I can't for the life of me recreate it. It might be that this is a really specific bug, in which case it might be really difficult to track down.

EDIT 2: So far I've encountered some strange behaviour, but maybe the weirdest was that F1 2018 wouldn't work reliably. I found out that I could sometimes fix this by going into settings and choosing my wheel as the preferred input, even though it already was. I added a pcapng of the traffic, packet 8751 is when I entered the options menu and packet 9378 is when I exited the menu, and when the wheel started functioning again. I'll have to try to figure out what exactly happened between those packets. This seems to also have caused the weirdness in Wreckfest, as it would work just fine when I hadn't run F1 2018 beforehand.
https://github.com/Kimplul/hid-tmff2/blob/pcaps/random_silence.pcapng

If anyone figures something out, please let me know.

@Kimplul
Copy link
Owner

Kimplul commented Sep 21, 2020

Okay, I pushed a fix for F1 2018 to the branch ramp, here
https://github.com/Kimplul/hid-tmff2/tree/ramp

Now F1 works like it should as does Wreckfest, at least on my machine. I still have no clue if this is even related to your original issue, but what the hey, a bugfix is better than nothing. Give the branch a try and I'll keep my fingers crossed.

@spocthier83
Copy link
Author

Has everything else worked like it should? Can you set the wheel's rotation, the wheel is frictionless when opened in oversteer, but autocentering comes on when you close oversteer?

To reply to this, when I first plug the wheel (after a fresh boot) :

  • the wheel doesn't calibrate it-self (but it moves a very little hieratically)
  • is "hard" to rotate manually, I fell resistance and "notches/steps".
  • it doesn't auto-recenter after manually rotating,
  • Oversteer displays no rotation and no button pressed

If I plug and (re)boot computer the wheel :

  • the wheel auto-calibrate automatically (as nominal case)
  • the wheel now auto center itself when I rotate it manually (as nominal case).
  • Oversteer displays rotation and buttons pressed (as nominal case)
  • the range limitation doesn't seem to work
  • but no FFB other than auto-recentering

And the wheel works like a charm under Windows.

I have built/reinstalled both modules without signing them, but it is exactly the same situation.
You are right : signing module or not doesn't change anything.

I really want to thank you for your support.

@Kimplul
Copy link
Owner

Kimplul commented Sep 21, 2020

Right, thanks for your patience. When the wheel goes "hard", it usually means that the wheel has crashed. It happened to me a couple of times when I was testing my wheel in games, but never when plugging it in, so I'm unfamiliar with this issue.

You could always try https://github.com/scarburato/hid-tminit, which is supposed to be a more generic Thrustmaster initialization module that @scarburato wrote a little while back. It just replaces the init that I wrote for this module. It's installed the same way this module is, just write make and sudo make install. If the wheel crashes during initialization, it could be an issue with my init, and this more generic init might make the wheel initialize like it should. A shot in the dark, but I'm sort of at my wits' end here.

As I've probably mentioned several times, everything works just fine on my end, and I can't for the life of me replicate your issues, so I have no real idea what the issue could be. Without your setup and possibly your wheel, debugging becomes incredibly hard and tedious, if not impossible.

@spocthier83
Copy link
Author

Hello,

I give up for now. I have no much time to spent to go deeper. Maybe some feedback from others users may help later.

I thank you for your help and to work on such a kind of project.

@Kimplul
Copy link
Owner

Kimplul commented Sep 23, 2020

I understand. Thank you for your patience.

@Kimplul
Copy link
Owner

Kimplul commented Nov 6, 2020

Hey, do you still have your wheel? We fixed an issue that migth've been messing up your wheel too.

@spocthier83
Copy link
Author

Guy, you rock! It works like a charm!
It's awesome to feel my T300RS again.

Now, i can sell my G29 little toy.

@Kimplul
Copy link
Owner

Kimplul commented Nov 7, 2020

Glad it works. Obviously thanks to @dafteran4, @berarma and @scarburato as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants