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

Thrustmaster T248x "You don't have the required permissions to change your wheel settings" #201

Open
eduncan911 opened this issue Apr 22, 2024 · 13 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@eduncan911
Copy link

Looks like something may have broken with permissions? New install of a T248 with the hid-tmff2 on Pop-OS 22.04 LTS.

FFB works and oversteer launches, runs the test, etc.

Oversteer works when launched as Root, and saves/adjusts settings.

As with #106, i've tried copying the udev rules into /lib/udev/rules.d/ and /etc/udev/rules.d/, and rebooted.

Still getting permissions issues.

$ oversteer --debug > debug.txt
DEBUG:root:update_device_list: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007/input/input16/event8 /dev/input/event8
DEBUG:root:/dev/input/event8: ID_VENDOR_ID: 044f ID_MODEL_ID: b696
DEBUG:root:Devices: {'/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007/input/input16/event8': <oversteer.device.Device object at 0x78798c84d360>}
DEBUG:root:/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007/input/input16/event8: {'device_manager': <oversteer.device_manager.DeviceManager object at 0x78798c80f550>, 'input_device': None, 'id': '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007/input/input16/event8', 'vendor_id': '044f', 'product_id': 'b696', 'usb_id': '044f:b696', 'dev_path': '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007', 'dev_name': '/dev/input/event8', 'name': 'Thrustmaster Thrustmaster Advance Racer', 'ready': True, 'max_range': 900}
DEBUG:matplotlib:matplotlib data path: /usr/share/matplotlib/mpl-data
DEBUG:matplotlib:CONFIGDIR=/home/jupiter/.config/matplotlib
DEBUG:matplotlib:interactive is False
DEBUG:matplotlib:platform is linux
DEBUG:matplotlib:loaded modules: ['sys', 'builtins', '_froz.......snip.snip........util', 'kiwisolver']
DEBUG:matplotlib:CACHEDIR=/home/jupiter/.cache/matplotlib
DEBUG:matplotlib.font_manager:Using fontManager instance from /home/jupiter/.cache/matplotlib/fontlist-v330.json
DEBUG:matplotlib.pyplot:Loaded backend TkAgg version unknown.
DEBUG:root:check_permissions: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007
DEBUG:root:check_file_permissions mode: 0o644 user: root group: root file: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4.2/2-1.2.4.2:1.0/0003:044F:B696.0007/range
DEBUG:root:flush_device
DEBUG:root:Setting autocenter strength: 0
DEBUG:root:Setting FF gain: 65535
DEBUG:root:flush_ui
@berarma
Copy link
Owner

berarma commented Apr 22, 2024

Can you try unplugging and plugging the wheel with the computer on then running Oversteer?

@eduncan911
Copy link
Author

Can you try unplugging and plugging the wheel with the computer on then running Oversteer?

Bingo! That worked! Oversteer launches in userspace now.

Any advice to triggering it on boot? (this is for the kiddos PC, hard to tell him custom stuff like this)

@berarma
Copy link
Owner

berarma commented Apr 22, 2024

It's an issue with the udev rules. I want to fix it but I needed to confirm first.

@ccoupe
Copy link

ccoupe commented Apr 24, 2024

The bug happens on my system as well. Unplugging and back also fixes it. FWIW this is a ubuntu 22.04 xfce with a Logitech G923 wheel.

$ uname -a
Linux bigboy 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

@eduncan911
Copy link
Author

Can you try unplugging and plugging the wheel with the computer on then running Oversteer?

One thing to note: Oversteer works with unplugin/plugging in as you suggested. However, once I select a saved Profile, I am no longer able to set the steering degrees from 900 to anything else. It's grayed out, not able to be changed. I can change other items at the bottom.

Not sure if that's a bug when profile switching, or related to this.

@berarma berarma added bug Something isn't working help wanted Extra attention is needed labels Apr 28, 2024
@berarma berarma added this to the 0.9.0 milestone Apr 28, 2024
@berarma
Copy link
Owner

berarma commented Apr 28, 2024

Can you try unplugging and plugging the wheel with the computer on then running Oversteer?

One thing to note: Oversteer works with unplugin/plugging in as you suggested. However, once I select a saved Profile, I am no longer able to set the steering degrees from 900 to anything else. It's grayed out, not able to be changed. I can change other items at the bottom.

Not sure if that's a bug when profile switching, or related to this.

I'm fixing the original issue but this is a different one. Could you run oversteer --debug and paste the output to a new ticket when this happens?

@berarma
Copy link
Owner

berarma commented Apr 28, 2024

Could you check if those issues are still present in the new master version?

@ccoupe
Copy link

ccoupe commented Apr 29, 2024

Could you check if those issues are still present in the new master version?

Still a problem on Mint 21.3 - For other reasons, I need to replace the OS with something newer, probably xubuntu 24.04 so that could be a different situation for oversteer.

@ccoupe
Copy link

ccoupe commented Apr 29, 2024

I've tried oversteer with ubuntu 24.04 and the news is mixed. The permissions at program launch is fixed. The problem with not being able to change (anything!) that @eduncan911 reported is confirmed. In games the wheel G923, is very heavy or stiff. Unusable. I'm going to boot back to Mint 21.3 - there are other problems with 24.04 unrelated to oversteer - I think they are unrelated.

@berarma
Copy link
Owner

berarma commented Apr 29, 2024

I need to split issues. This one is about the permissions. Please, confirm if it's fixed or not. It shouldn't depend on the distribution, and if it is I won't be able to debug it.

For other issues please open new tickets.

@ccoupe
Copy link

ccoupe commented Apr 29, 2024

It shouldn't depend on the distribution, and if it is I won't be able to debug it.

Sadly the distribution seems to matter on permissions. They do not work for me - Mint 21.3. What can I do to help?

@berarma
Copy link
Owner

berarma commented Apr 29, 2024

It shouldn't depend on the distribution, and if it is I won't be able to debug it.

Sadly the distribution seems to matter on permissions. They do not work for me - Mint 21.3. What can I do to help?

The reason the permissions failed on boot in the first place was that the ramdisk used in the boot process contained the module for the wheel but not the udev rules. In my case it's initramfs. Thus the udev rules weren't loaded when they needed to be. At least that's the case I identified.

The fix consists in changing the udev rules should they run whenever they're loaded even if the events related to the loading of the module have happened already.

Something you can try if this doesn't work like intended is removing the ACTION conditions in the udev rules files. Although it shouldn't be needed for the current version in master.

Today I added a new commit with a minor fix. I don't think it fixes anything but I might be wrong. Maybe could explain why it works in your second install but didn't work in the first one.

@ccoupe
Copy link

ccoupe commented Apr 29, 2024

Something you can try if this doesn't work like intended is removing the ACTION conditions in the udev rules files. Although it shouldn't be needed for the current version in master.

That worked! Thank you

# Match kernel name of device, rather than ATTRS{idProduct} and ATTRS{idVendor}
# so we can access the range file and leds directory. Set rw access to these 
# files for everyone.
# Avoid blanket matching all Logitech devices, as that causes issues with mice,
# keyboards, and other non-wheel devices.

SUBSYSTEM=="hid", ATTRS{idVendor}=="046d" GOTO="logitech-rules"
GOTO="end"

Those are the first lines of the file /usr/local/lib/udev/rules.d/99-logitech-wheel-perms.rules after editing, I only fixed the one I use.

I'll file a new bug report about the profile problems that I have on this version and the newer os.

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

No branches or pull requests

3 participants