scarburato / t150_driver Goto Github PK
View Code? Open in Web Editor NEWLinux driver for Thrustmaster T150 Steering Wheel USB
License: GNU General Public License v2.0
Linux driver for Thrustmaster T150 Steering Wheel USB
License: GNU General Public License v2.0
Its working within Steam with Assetto Corsa. But BeamNG doesn't pick it up. It finds the xbock controller just fine - just not the wheel. Also tried all the controller settings with Steam.
Don't know it's something that can be solved with this driver though. But maybe someone knows a solution.
In Dirt Rally 2.0 as soon i start the game, the wheel pulls to the left and more importantly has a very strong rumble effect constantly, no matter the settings in game, even if the vehicle is not moving. That works with Steam input On , as xbox360 controller but with Input disabled its not being recognised at all in Dirt.
Any ideas?
Based on #40 probably combined pedals are set using command
0x42 05
Do we have any documentation for thrustmaster codes?
Hello and a big 'thank you' for the coding!
Briefly about me; I'm not a programmer or similarly inclined 'nerd', but just a simple Linux user ... ;-)
I found your code on git-hub. I couldn't manage the installation of the code and the necessary preparations without help (despite your instructions).
With the help of some guys from LUG-V.s. I managed to get the steering wheel t150 working under Linux Tumbleweed 64bit. I am convinced that this is possible under any Linux.
I use the steering wheel in the racing simulation Live for Speed (LFS), in which steering and pedals do not need to be configured; they are automatically detected. Only the steering wheel buttons have to be assigned.
Pedals and steering wheel work perfectly and I am really happy now.
Here I created a wiki (will still translate it from German into readable English).
A little anecdote:
I bought the Thrustmaster t150 steering wheel just a few weeks ago and could only use it on Windows (which I don't like to boot at all).
I then created a ticket with the manufacturer asking for support.
The answer was literally, "You will never get the steering wheel to work on Linux."
This annoyed me bit and I searched the net and found your code. Great!
As I learned here, I can't rely on firmware updates, and in fact it seems that after a major OS update of my Tumbleweed, a reinstallation of the code is necessary. But this is only a minor issue.
Thank you very much for your super work! Thumbs up!
Translated with www.DeepL.com/Translator (free version)
it will be nice if you added a default.nix file for installing this nice dirver on nixos
Hi,
Did the install, dmesg gives this output - I'm trying to use the wheel in rfactor 2 thru steam, running manjaro - but can't get any response from the wheel or pedals.
Any way to actually test that it works ?
[87440.388999] usb 1-2: new full-speed USB device number 13 using xhci_hcd
[87440.530647] usb 1-2: New USB device found, idVendor=044f, idProduct=b65d, bcdDevice= 1.00
[87440.530653] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[87440.530656] usb 1-2: Product: Thrustmaster FFB Wheel
[87440.530659] usb 1-2: Manufacturer: Thrustmaster
[87440.534048] input: Thrustmaster Thrustmaster FFB Wheel as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:044F:B65D.000F/input/input46
[87440.534439] hid-tminit 0003:044F:B65D.000F: input,hidraw5: USB HID v1.00 Gamepad [Thrustmaster Thrustmaster FFB Wheel] on usb-0000:00:14.0-2/input0
[87440.553260] hid-tminit 0003:044F:B65D.000F: Wheel with model id 0x306 is a Thrustmaster T150RS
[87440.556380] hid-tminit 0003:044F:B65D.000F: Success?! The wheel should have been initialized!
[87440.556485] usb 1-2: USB disconnect, device number 13
[87440.859011] usb 1-2: new full-speed USB device number 14 using xhci_hcd
[87441.000453] usb 1-2: New USB device found, idVendor=044f, idProduct=b677, bcdDevice= 1.00
[87441.000460] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[87441.000463] usb 1-2: Product: Thrustmaster T150RS
[87441.000466] usb 1-2: Manufacturer: Thrustmaster
[87441.003927] hid-t150 0003:044F:B677.0010: hidraw5: USB HID v1.11 Joystick [Thrustmaster Thrustmaster T150RS] on usb-0000:00:14.0-2/input0
[87441.004027] input: Thrustmaster T150 steering wheel as /devices/pci0000:00/0000:00:14.0/usb1/1-2/input/input47
[87441.017127] hid-t150 0003:044F:B677.0010: Setup completed! Firmware version is 21
I read somewhere, that you are looking for testers. I want to test it for a Thrustmaster T300 wheel with ETS2 on steam. What do I have to change? Do I have to change anything?
I found that wverything is working so far with your driver.
Only the wheel it self has the issue of an 90° deadzone in both directions.
Is there any function in your driver to set it to 0° ?
Hi there,
I am new to the whole steering wheel business and just got myself a T150 Pro.
Is there any way I can help to expand support for it?
If there is, let me know :)
Regards,
Lazalatin
Hi,
I know that this is not supposed to work with T80 but I'd like to ask for some help how build a support for T80.
Can you help me in this?
Thank you,
Lev
I set up udev rules according to readme instructions. I'm getting following errors:
$ journalctl -u systemd-udevd
lis 09 17:47:56 tomek-laptop mtp-probe[14105]: checking bus 3, device 25: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
lis 09 17:47:56 tomek-laptop (udev-worker)[13808]: 3-4: /etc/udev/rules.d/t150-defaults.rules:1 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/range}, ignoring: No such file or directory
lis 09 17:47:56 tomek-laptop (udev-worker)[13808]: 3-4: /etc/udev/rules.d/t150-defaults.rules:1 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/gain}, ignoring: No such file or directory
My udev rule:
SUBSYSTEM=="usb", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b677", ATTR{range}="540", ATTR{gain}="75"
real path of device attrs is /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:044F:B677.001D/range
but udev rule looks here:
ls /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/
0003:044F:B677.001D bAlternateSetting bInterfaceNumber bInterfaceSubClass driver ep_82 modalias power supports_autosuspend
authorized bInterfaceClass bInterfaceProtocol bNumEndpoints ep_01 firmware_node physical_location subsystem uevent
i'm on fedora 37
Hello,
I'm having trouble installing the Thrustmaster T150 driver on my system. I'm running steamos, Arch Linux with kernel version 5.13.0-valve36-1-neptune. I cloned the repository and ran the install.sh
script, but I received the following errors:
==== REMOVING OLD VERSIONS ====
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Module t150-0.8a for kernel 5.13.0-valve36-1-neptune (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
hid-t150.ko.xz:
- Uninstallation
- Deleting from: /usr/lib/modules/5.13.0-valve36-1-neptune/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod.....
Deleting module t150-0.8a completely from the DKMS tree.
rmmod: ERROR: Module hid_t150 is not currently loaded
==== CONFIG DKMS ====
mkdir: cannot create directory ‘/usr/src/t150-0.8a’: File exists
mkdir: cannot create directory ‘/usr/src/t150-0.8a/build’: File exists
==== DKMS ====
Deprecated feature: REMAKE_INITRD
Creating symlink /var/lib/dkms/t150/0.8a/source -> /usr/src/t150-0.8a
Sign command: /usr/lib/modules/5.13.0-valve36-1-neptune/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD
Building module:
make KDIR=/usr/lib/modules/5.13.0-valve36-1-neptune/build clean
make -C ./hid-t150 clean
make[1]: Entering directory '/var/lib/dkms/t150/0.8a/build/hid-t150'
make -C /usr/lib/modules/5.13.0-valve36-1-neptune/build M=/var/lib/dkms/t150/0.8a/build/hid-t150 clean
make[2]: Entering directory '/usr/lib/modules/5.13.0-valve36-1-neptune/build'
make[2]: Leaving directory '/usr/lib/modules/5.13.0-valve36-1-neptune/build'
make[1]: Leaving directory '/var/lib/dkms/t150/0.8a/build/hid-t150'
rm -rf ./build/*
{ make -j8 KERNELRELEASE=5.13.0-valve36-1-neptune KDIR=/usr/lib/modules/5.13.0-valve36-1-neptune/build all; } >> /var/lib/dkms/t150/0.8a/build/make.log 2>&1
Signing module /var/lib/dkms/t150/0.8a/build/build/hid-t150.ko
make KDIR=/usr/lib/modules/5.13.0-valve36-1-neptune/build clean
make -C ./hid-t150 clean
make[1]: Entering directory '/var/lib/dkms/t150/0.8a/build/hid-t150'
make -C /usr/lib/modules/5.13.0-valve36-1-neptune/build M=/var/lib/dkms/t150/0.8a/build/hid-t150 clean
make[2]: Entering directory '/usr/lib/modules/5.13.0-valve36-1-neptune/build'
CLEAN /var/lib/dkms/t150/0.8a/build/hid-t150/Module.symvers
make[2]: Leaving directory '/usr/lib/modules/5.13.0-valve36-1-neptune/build'
make[1]: Leaving directory '/var/lib/dkms/t150/0.8a/build/hid-t150'
rm -rf ./build/*
Deprecated feature: REMAKE_INITRD
hid-t150.ko.xz:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/5.13.0-valve36-1-neptune/updates/dkms/
do_depmod 5.13.0-valve36-1-neptune
==== INSTALLING UDEV RULES ====
'./files/etc/udev/rules.d/99-t150-deafults.rules' -> '/etc/udev/rules.d/99-t150-deafults.rules'
'./files/etc/udev/rules.d/10-t150.rules' -> '/etc/udev/rules.d/10-t150.rules'
==== LOADING NEW MODULES ====
modprobe: ERROR: could not insert 'hid_t150': Invalid argument
When I checked the system messages with dmesg | grep hid_t150
, I saw these messages:
(deck@steamdeck t150-driver)$ sudo dmesg | grep hid_t150
[ 1973.950424] hid_t150: loading out-of-tree module taints kernel.
[ 1973.950507] hid_t150: module verification failed: signature and/or required key missing - tainting kernel
[ 1973.951247] failed to validate module [hid_t150] BTF: -22
[ 2329.443274] failed to validate module [hid_t150] BTF: -22
[ 2397.876530] failed to validate module [hid_t150] BTF: -22
I've already tried installing the linux-neptune-headers package, but I'm still getting the same errors. I also ensured that the joydev module is loaded on my system. I haven't been able to find the evdev module.
Do you have any suggestions for how I can resolve this issue?
Thanks for your help.
modprobe: ERROR: could not insert 'hid_t150': Key was rejected by service
is the error given
Quick system specs:
EndeavourOS "Cassini Nova"
Linux Kernel: 6.3.0 (linux-mainline, linux-mainline headers from AUR)
Shell: bash 5.1.16
CPU: Ryzen 5 5600X
GPU: Intel DG2 (Arc A770)
So I have a Thrustmaster T150 Pro (with a TH8a shifter as well), and I installed the t150_driver-dkms-git package from the Arch User Repository. The install seemed to go fine, no errors, and all the package does is clone from this git repository and install the driver.
I'm trying to use this wheel with PCSX2, specifically pcsx2-git from the AUR which clones latest nightly (I'm doing it this way since running it from the AppImage doesn't seem too give it the correct permissions for devices for netplay.) I'm also on a newer kernel to fix HDMI audio for my GPU, as I am outputting to a TV like a real PS2.
After installing the driver, unplugging the wheel and plugging it back in again, it calibrates and autocenters like normal. When I tug on the wheel, it has an autocentering force. However when I start pcsx2-qt via console and check the log output it shows this when starting a game with force feedback commands:
[ 1.4359] (SDLInputSource) Opened joystick 1 (instance id 1, player id 1): Thrustmaster T150RS
[ 1.4359] (SDLInputSource) Rumble is supported on 'Thrustmaster T150RS' via haptic
...
[ 40.8379] Opening USB...
[ 40.8380] (SDLFFDevice) Friction effect is not supported on 'SDL-1'
[ 40.8380] (SDLFFDevice) Autocenter effect is not supported on 'SDL-1'
The wheel goes limp whenever PCSX2 is open. No autocentering force, nothing. SDL-1 is the identifier assigned to the wheel by SDL2. The second I close PCSX2, the wheel autocenters again with force.
How can I figure out what's going wrong here? Why is PCSX2 not getting the force feedback capabilities of the wheel? Is it something to do with the udev rules?
EDIT: Upon further investigation, this is also happening in Oversteer as well, even when I copy that program's 99-thrustmaster-perms.rules to my udev rules.d directory.
I've also tested using ffcfstress -d and the wheel does indeed spin by itself
@scarburato, @Kimplul: To add missing features, like combined pedal models , we need to a guide to read usb captures. (sorry if this is already described elsewhere, I look around but didn't find much info)
I add here a capture of range change: from 900 to 140, then to 1080 and then to 900 again, so this is a feature already covered in range property.
Then, I'm adding a capture for change pedals from default (separate mode) to combined pedals (that means accel and brake is always in the middle, and accel reduces brake axis, while brake increases brake axis
NOTE: Captures are in pcapng format and in txt (with bytes) so should be easy to recognize patterns and filter pings and responses from host to device to isolate codes to setup device.
First i want to say that with just hid-tminit
the wheel works alright in Assetto and Dirt 2.o but has no FFB.
When I use the driver the axis of clutch and wheel is swapped as shown in Debian game controller configuration and the wheel doesn't work at all: Assetto does not recognise the wheel and Dirt 2.0 sees it as X360 gamepad and only recognise buttons on the wheel.
I'm trying to get my T150 to work with Project Cars 2 and Automobilista, using Steam Proton. ( ValveSoftware/Proton#4819 )
I don't think this is related to my problem, but when I checked lsusb, the product name is picked up from my Prusa printer.
lsusb -d 044f:b677
Bus 001 Device 098: ID 044f:b677 ThrustMaster, Inc. Original Prusa i3 MK3
Looking closer in, I can see that idProduct shows no text.
lsusb -v -d 044f:b677
idVendor 0x044f ThrustMaster, Inc.
idProduct 0xb677
bcdDevice 1.00
Xbox Controller for comparison
lsusb -d 045e:02d1
Bus 001 Device 099: ID 045e:02d1 Microsoft Corp. Xbox One Controller
lsusb -d 045e:02d1 -v
idVendor 0x045e Microsoft Corp.
idProduct 0x02d1 Xbox One Controller
bcdDevice 1.01
First I though that the firmware might be behaving badly, but I think the strings from the firmware appear in the following values (the actual strings are only fetched when running with "sudo")
iManufacturer 1 Thrustmaster
iProduct 2 Thrustmaster T150RS
iSerial 0
lsusb-xbox-sudo.txt
lsusb-xbox.txt
lsusb-prusa-sudo.txt
lsusb-prusa.txt
lsusb-v-t150.txt
lsusb-v-t150-sudo.txt
After launching ./install.sh, I have this console log:
==== REMOVING OLD VERSIONS ====
./install.sh: line 13: dkms: command not found
==== CONFIG DKMS ====
mkdir: cannot create directory ‘/usr/src/t150-0.7b’: File exists
mkdir: cannot create directory ‘/usr/src/t150-0.7b/build’: File exists
mkdir: cannot create directory ‘/usr/src/t150-0.7b/hid-tminit’: File exists
fatal: destination path '/usr/src/t150-0.7b/hid-tminit' already exists and is not an empty directory.
==== DKMS ====
./install.sh: line 32: dkms: command not found
./install.sh: line 33: dkms: command not found
./install.sh: line 34: dkms: command not found
==== SET UP LOAD AT BOOT ====
==== INSTALLING UDEV RULES ====
'./files/etc/udev/rules.d/10-t150.rules' -> '/etc/udev/rules.d/10-t150.rules'
==== LOADING NEW MODULES ====
modprobe: FATAL: Module hid-tminit not found in directory /lib/modules/5.9.11-3-MANJARO
modprobe: FATAL: Module hid-t150 not found in directory /lib/modules/5.9.11-3-MANJARO
Hi, I dont know which funtions "force feedback (partially) is missing" refers to, could someone please state them to me, because Im thinking of buying a T150 and am wondering which funtions I'd be missing out on more specifically?
Hello everyone,
grazie mille, Dario, sei grandissimo! Lots of thanks to Dario and other contributors! You saved my day.
I got such a wheel recently and it worked well for me, except for clutch pedal. (Model T150 PRO).
In Live For Speed, I see 2 devices: T150... (event)
and T150 (js)
. In the first one, clutch duplicates the brake pedal. In the second one, clutch is on the same axis as the steering wheel.
I have a bit of C experience with Arduinos. What can I change to try recompiling it and making clutch axis work independently? I walked through files and can't exactly point at what is changeable. (sorry if I make an issue without a need)
I see t150_input_state_packet, but if it's what the wheel sends, then IDK how to change that, except send it some state packet?
the first 45 degrees left and 45 degrees right are not reported by the wheel
Wheel: Thrustmaster T150
Distro: Arch Linux
This reddit thread I saw in another post basically exactly describes what I have. I installed in Pop!_OS with the install.sh lsmod | grep hid-t150
and lsmod | grep hid-tminit
don't show anything. If I run dkms status
I see t150, 0.7c, 5.11.0-7614-generic, x86_64: installed
. lsmod shows it's installed also and running evtest I can see the outputs from the wheel as I move the axis. It shows as a joystick when I do udevadm info /sys/class/input/event26/device
. What fixed this reddit users issue was installing deb version of steam instead of flatpack which I'm already using so I'm not sure what to do. It doesnt even register in a native game like ets2 so I dont see how it could be an issue with proton.
after running sudo sh install.sh
seems like it has installed, however, when i run lsmod | grep hid-tminit
or lsmod | grep hid-t150
i am not getting any output. dirt rally doesn't see my wheel, and ets2mp doesn't even start. the wheel doesn't have autocenter on so i'm guessing the drivers are here? it was working a week ago, but i messed up with my x server and drivers, so i had to do a clean install.
I would take https://github.com/berarma/oversteer/issues from @berarma as default "tester" for driver.
I still see some features missed in oversteer configuration:
Will focus on get all that in place
Hello,
It's been a while now since i'm trying to get this working. Everything works fine in ets2 except for the most important thing:
The auto centering with the ffb while the truck is moving. i can't get this to work. everything else of the ffb works fine.
I don't know if it's a problem on my side or if it doesn't work at all.
I could play with the "enable_autocenter" on but i don't really like it.
Can you help me in some way?
Thanks you for all the job you did! Totten
Hi! i followed the steps to install correctly the t150 driver on my Manjaro Linux system, but from the games i tried and from the Manjaro's controller panel there is almost 45° dead-zone from each side starting from 0 and turning left/right, How could i fix this?
UPDATE: i tried to calibrate it from the game's controller panel and still no work, instead of working it became even worst
(deh pefforza)
UPDATE 2: i also tried to reduce steering range to 900° and dead-zone still remain, it's a bit lower if i change it to 270°
Hi.
I'm happy to see you're working on getting Thrustmaster wheels fully supported on Linux. That would be great. Thanks!
I know someone who's writing a T300RS module. Here's his project: hid-tmff2.
I guess your projects could mutually benefit from sharing information since both wheels may have a lot of similarities.
I don't own a TM wheel myself but I've written an improved module for Logitech wheels: new-lg4ff. I've also written some tools: Oversteer, ffbtools. Maybe these can be valuable to you.
Cheers.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...(bad exit status: 2)
make -j12 KERNELRELEASE=5.11.22-tkg-bmq KDIR=/lib/modules/5.11.22-tkg-bmq/build all...(bad exit status: 2)
ERROR (dkms apport): binary package for t150: 0.7c not found
Error! Bad return status for module build on kernel: 5.11.22-tkg-bmq (x86_64)
Consult /var/lib/dkms/t150/0.7c/build/make.log for more information.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...(bad exit status: 2)
make -j12 KERNELRELEASE=5.11.22-tkg-bmq KDIR=/lib/modules/5.11.22-tkg-bmq/build all...(bad exit status: 2)
ERROR (dkms apport): binary package for t150: 0.7c not found
Error! Bad return status for module build on kernel: 5.11.22-tkg-bmq (x86_64)
Consult /var/lib/dkms/t150/0.7c/build/make.log for more information.
==== INSTALLING UDEV RULES ====
'./files/etc/udev/rules.d/10-t150.rules' -> '/etc/udev/rules.d/10-t150.rules'
==== LOADING NEW MODULES ====
modprobe: FATAL: Module hid-t150 not found in directory /lib/modules/5.11.22-tkg-bmq
This is my output when trying to install the driver
The wheel works in game, but there is no force feedback, only a strong return to center
https://patchwork.kernel.org/project/linux-input/patch/[email protected]/#24038275
https://elixir.bootlin.com/linux/v5.13/source/drivers/hid/hid-thrustmaster.c
Probably worth to mention on README.md
Can I provide a patch?
Not an Issue but i bought the T3PM Pedals and they work with the new Firmware 35 Perfectly with this driver.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.