bazzite icon indicating copy to clipboard operation
bazzite copied to clipboard

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

Open napaalm opened this issue 4 months ago • 5 comments

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 ublue-os/bazzite#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

napaalm avatar Mar 20 '24 01:03 napaalm

transffered issue to the kmods repo for easier tracking

gerblesh avatar Mar 20 '24 04:03 gerblesh

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

gerblesh avatar Mar 20 '24 04:03 gerblesh

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.

mmhorda avatar Apr 14 '24 10:04 mmhorda

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.

napaalm avatar Apr 14 '24 14:04 napaalm

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.

mmhorda avatar Apr 15 '24 07:04 mmhorda