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

Add kernel driver modules for steering wheels (hid-tmff2 in particular) #901

Open
napaalm opened this issue Mar 20, 2024 · 16 comments
Open

Comments

@napaalm
Copy link

napaalm commented Mar 20, 2024

Describe the package

First of all, thank you for including a simple one-click method to install oversteer!
Unfortunately though that's not sufficient to use my steering wheel (a Thrustmaster T300RS) because it requires a custom kernel module, which is hid-tmff2.

It's a particularly painful issue because, from what I understand, DKMS packages are not supported by rpm-ostree, and because of #899 I can't build the module locally either (instead I have to build it in a toolbox where I installed the right kernel headers) (EDIT: solved).

I would propose to include in bazzite all the custom drivers required by oversteer, which are (from the project's README):

Finally, I want to point out that, even when I managed to load the custom module, my wheel wouldn't work on proton games on Steam, so I found hid-tmff2#54 and after adding the following udev rule on it started working properly:

KERNEL=="hidraw*", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b66e", MODE="0660", TAG+="uaccess"

I'll let you figure out which udev rules should be added to bazzite by default, considering that a /usr/lib/udev/rules.d/99-thrustmaster-wheel-perms.rules already exists (and I assume it comes from oversteer) but only changes the permissions to configure the device and not to access it.

Image

Nvidia

@gerblesh gerblesh transferred this issue from ublue-os/bazzite Mar 20, 2024
@gerblesh
Copy link
Contributor

transffered issue to the kmods repo for easier tracking

@gerblesh
Copy link
Contributor

whoops! I'll just leave it back in bazzite for now

@gerblesh gerblesh transferred this issue from ublue-os/akmods Mar 20, 2024
@mmhorda
Copy link

mmhorda commented Apr 14, 2024

Describe the package

First of all, thank you for including a simple one-click method to install oversteer! Unfortunately though that's not sufficient to use my steering wheel (a Thrustmaster T300RS) because it requires a custom kernel module, which is hid-tmff2.

It's a particularly painful issue because, from what I understand, DKMS packages are not supported by rpm-ostree, and because of #899 I can't build the module locally either (instead I have to build it in a toolbox where I installed the right kernel headers).

I would propose to include in bazzite all the custom drivers required by oversteer, which are (from the project's README):

Finally, I want to point out that, even when I managed to load the custom module, my wheel wouldn't work on proton games on Steam, so I found hid-tmff2#54 and after adding the following udev rule on it started working properly:

KERNEL=="hidraw*", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b66e", MODE="0660", TAG+="uaccess"

I'll let you figure out which udev rules should be added to bazzite by default, considering that a /usr/lib/udev/rules.d/99-thrustmaster-wheel-perms.rules already exists (and I assume it comes from oversteer) but only changes the permissions to configure the device and not to access it.

Image

Nvidia

How did you load the module? I am trying to add hid-fanatecff but FS is read only.
I've tried:
steamos-readonly enable - not found
sudo btrfs property set / ro false - doesn't work
mount -o remount,rw / - doesn't work

Thank you in advance.

@napaalm
Copy link
Author

napaalm commented Apr 14, 2024

How did you load the module? I am trying to add hid-fanatecff but FS is read only.

@mmhorda you shouldn't try to modify the root filesystem directly, as it is immutable by design (see https://docs.fedoraproject.org/en-US/fedora-silverblue/technical-information/).

You could technically build the module and layer it to your installation, but you would have to create a new layer after every kernel update because DKMS is not supported yet.

My current solution is to rebuild the module and load it every time I log in:

  • Clone the repository in your home, git clone https://github.com/gotzl/hid-fanatecff.git ~/hid-fanatecff
  • Write the script ~/wheel-driver.sh with the following content:
#!/bin/sh
set -x
make -C ~/hid-fanatecff clean
make -C ~/hid-fanatecff
sudo insmod ~/hid-fanatecff/hid-fanatec.ko
sudo cp ~/hid-fanatecff/fanatec.rules /etc/udev/rules.d/99-fanatec.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
  • Run the script every time after you reboot the system, either manually or with some other mechanism.

I just pasted my script for hid-tmff2 and adapted to hid-fanatecff, so you might need to fix it, but you get the idea. Also, you might need to rpm-ostree install some tools needed for compilation.

Let's hope these modules get added soon so we won't need to use this workaround.

@mmhorda
Copy link

mmhorda commented Apr 15, 2024

I made it work but then i gave up :)

Basically I placed compiled module to /usrl/local/lib/kernel/ (created folders if missing
then created /etc/rc.local file and added
insmod /usrl/local/lib/kernel/hid-fanatecff.ko - so it would be loading on the boot
it worked (wheel, pedals, shifters, shiter, etc) but then. no FFB in ACC - No idea how to debug from here.
then issue with external GPU + Monitor over thunderbol - didnt work (wored in desktop mode with super huge lag and 75Hz on monitor) so I gave up,

Otherwise it is a very cool idea (works on windows) have a handhld and hook it up to a sim rig with eGPU for a drive.

@trbocode
Copy link
Contributor

trbocode commented Jun 8, 2024

Mine similarly works intermittedly - SDL doesn't register it, but Oversteer does. I'm insmodding the module than connecting and it worked exactly once in SDL. T150 user, it works fine in other Linux Distros.

@RayBa82
Copy link

RayBa82 commented Aug 23, 2024

I tried to achieve anything of this thread, the make command didn't even work :-)
I tried to use a Fanatec wheel, which depends on "hid-fanatecff" according to the documentation.

Is there any chance that this could be baked into bazzite? Or make it as optional installation for the Oversteer option?

If my steering wheel would work this would be THE one argument to buy a collapsible gaming seat for my living room :-D
Even my wife would love this, since she is an auto nerd :-D

@QuickFastly
Copy link

QuickFastly commented Aug 30, 2024

In the event these drivers do end up eventually getting baked into bazzite, I'd like to add simagic-ff to the list. perhaps a branch other than master though, since the current master branch doesn't support recent wheel firmware and I don't know when it will.

Until then, the script posted by napaalm works, although it may be better to build the module in a distrobox to avoid needing any layered packages

@Dewm-Bot
Copy link

Dewm-Bot commented Oct 7, 2024

For anyone still waiting for official support, the method provided by @napaalm can be done again, as long as you're on the testing branch. For this example, I'll be using hid-fanatecff.

Note: If kernel-devel packages are available for the version you're running, there is no need to switch to testing. As of current, the stable build's kernel-devel packages are not available on COPR, so I needed to switch to testing for the time being.

Starting off, ensure you have installed kernel-devel-matched, and if you haven't been able to get "ld" to work, you can install binutils-devel to get access to ld.bfd.

Pull the hid-fanatecff repo, for simplicity sake, I'll be pulling to my /home folder.

Create the wheel-driver.sh as suggested before. There is probably a better way to set ld.bfd as the ld that's used, but for my case I was not able to, so I removed the make commands from the script. This also means you don't have to rebuild the .ko every time.

#!/bin/sh
set -x
sudo insmod ~/hid-fanatecff/hid-fanatec.ko
sudo cp ~/hid-fanatecff/fanatec.rules /etc/udev/rules.d/99-fanatec.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Next, edit the KERNEL_SRC line in the makefile to the following.
KERNEL_SRC ?= /usr/src/kernels/${KVERSION}/

Build the .ko with
make LD=ld.bfd
Feel free to use a different LD provider, if I'm doing things wrong here.

You will need to run this command again if your kernel version changes. Make sure that you also have the up-to-date kernel-devel-matched package.

Then, finally run
sh ./wheel-driver.sh
And you should be off to the races.

You should be seeing your device being detected and setup properly in
sudo dmesg
Like the following:

[  263.706973] input: HID 0eb7:0011 as /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13.1/1-13.1:1.0/0003:0EB7:0011.0015/input/input44
[  263.707580] fanatec 0003:0EB7:0011.0015: input,hidraw5: USB HID v1.11 Joystick [HID 0eb7:0011] on usb-0000:00:14.0-13.1/input0
[  263.707903] fanatec 0003:0EB7:0011.0015: Hires timer: period = 2 ms

If you do not see this message, or get an error; try again with a USB 2.0 port.

Currently I am unable to get oversteer to work with this, though games are able to use forcefeedback and work correctly. My device is being detected on /dev/input/event9. If someone else is getting oversteer to work with their device, do let us know.

Hopefully that helps for now, though I am still unsure if this needs to be moved back to https://github.com/ublue-os/akmods

@mwprado
Copy link

mwprado commented Nov 8, 2024

Please, add support for logitech g29 too.

@lithiumfox
Copy link

https://github.com/JacKeTUs/universal-pidff

This has some solid summaries on why most of these devices don't work, particularly in my case I have a VRS wheel. While it would be reasonable to state "well the hardware manufacturers should be doing things correctly", its a bit difficult to convince them and the games people play with those devices to support these operating systems when, well, we can't really use them at all as it stands.

Overall, this would be one of two final nails in the coffin for me for Windows. The other nail being "iRacing supporting EOS on Linux". But I would at least like to see if I can try some of the other games I have with it though.

@peter1970uk
Copy link

https://github.com/JacKeTUs/universal-pidff

This has some solid summaries on why most of these devices don't work, particularly in my case I have a VRS wheel. While it would be reasonable to state "well the hardware manufacturers should be doing things correctly", its a bit difficult to convince them and the games people play with those devices to support these operating systems when, well, we can't really use them at all as it stands.

Overall, this would be one of two final nails in the coffin for me for Windows. The other nail being "iRacing supporting EOS on Linux". But I would at least like to see if I can try some of the other games I have with it though.

I also have vrs wheel and am desperate to get it working on bazite.

@AlexNPavel
Copy link

I would also love to get my T300RS working on Bazzite. Games don't seem to recognize it and Oversteer seems very confused about the wheel as well. As Bazzite is a distro focused on gaming, I feel that it should include drivers for game controllers (which simwheels are) by default.

@BombusAlpinus
Copy link

BombusAlpinus commented Feb 8, 2025

+1
i would also like to see better steering wheel support in bazzite. as @AlexNPavel already said... bazzite is a gaming focused distro which does this very well and would even get better with broader steering wheel support...
as example: euro truck simulator 2 and forza 5 run on my daily linux mint system with the hid-tmff2 module installed and a tm 128 wheel without problems. on bazzite the dead zone of the wheel in ET2 is horrible and the wheel is nearly unusable... forza 5 doesnt recognize the wheel at all...

@napaalm
Copy link
Author

napaalm commented Feb 12, 2025

@KyleGospo any update on this?

@BombusAlpinus
Copy link

i would also like to know if there are any news or progress in this case.
in the meantime i temporarily switched to nobara where the t128 also works after installing the hid-tmff2 module...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests