Driving Simulator for Vehicle Research

Yeah, seems there is some regression between Wine 7.17 and 7.18. Tried it with my own build of Wine-staging 7.18 + patches, and it crashes in the online paddock part. While with Wine 7.17 (from Arch Linux) it works properly. Will have to update and try with Wine 7.18 from Arch.

The utility above looks handy.
This is one of the disadvantages of using a separate wineprefix per game. For this reason, and for easier development, I have installed Steam for Windows in a single wineprefix. Not all games work with standard Wine/Wine-staging though. But after porting some of the needed patches from proton, itā€™s OK. And I can use CrewChief, SimHub, JoyToKey, etc. in one install.

I know this evdev bug, since I reported it about ~8 months ago + a patch to fix it. The sdl backend is default, so it mitigates the problem. But after that backend is disabled, the next is hidraw and then evdev, which crashes while parsing a keyboard report descriptor. The Wine devs probably overlooked the issue, since it doesnā€™t happen in normal prefixes.

However, they wonā€™t accept disabling the sdl backend as this is the most compatible solution. IMO what is needed is to reverse the order of running with hidraw first (evdev disabled) and then sdl for compatibility. Itā€™s not trivial to do, though.
May rise the issue again and discuss with them, if time permits.

I tested TrueDrive in Wine 7.18 and it works as expected incl. the online part. Tried searching for profiles, applying profiles, etc., all seems to work properly. So the crash Iā€™m experiencing is not related to Wine (standard). Probably some of the staging patches or my backported proton patches.

@S.R.Lemke, try Wine (standard) if you are using staging. The problem might be in staging. Also make sure it is not running in some kind of sandbox (flatpak, snap, firejail, etc.), that is denying network access. I have the same behavior with TrueDrive on Windows, when I block outgoing network connections with Windows Firewall.

I also tested R3RE with Proton 7/Experimental, and you are right that there is some problem with it. In my case it is crashing when getting into a car. The issue also exists on my custom staging build, so itā€™s most likely the SDL backend, since hidraw works perfectly. Iā€™ll look into that.

Regarding the Proton 7/Experimental R3 crash:

With proton6, when I click ā€˜driveā€™ on R3, after some 1/2 seconds I see I quick micro-freeze, but it works normally, when I noticed that I decided to keep a terminal open with a dmesg -w and a kernel crash happens and prints a stacktrace, but with proton6 no problem, game continues to work, with proton7 it crashes, I think it is the same kernel crash, itā€™s just that proton6 can deal with it while proton 7 not.

For the wine / truedrive I did not invest time investigating it, I think internet in the wine/prefix that runs truedrive is fine, but have to dig more.

Yeah, itā€™s a warning for an out of bounds value - 16bit to 8bit in hid-core - which just prints a call stack for easier tracking of the issue, I guess. It is one of the fields (loop_count) of the HID report that starts ffb effect. SDL sends 0xFFFF (16bit) while the HID report requires 8bit - ie. 0xFF. Itā€™s harmless. Eventually they crop it to 8bit and send it that way to the device.
The problem is that thousands such messages are logged per gaming session. I already have a fix for this, which will submit to winehq next week. Hopefully theyā€™ll accept it and then backport to Proton also.

For Proton 7, the issue is somewhere in Wineā€™s SDL backend, since hidraw works and probably evdev as well.

Oh, so this is somehow related to this?

[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:00 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
[Sat Oct  1 13:01:01 2022] hid-generic 0003:16D0:0D61.0011: output queue full
proton:/home/slemke #

I get a lot of those per session:

proton:/home/slemke # dmesg -T |grep -c 'output queue full'
4670
proton:/home/slemke #

I saw these once, but couldnā€™t provoke them again. None of the sims with high ffb rate (BeamNG, rF2, AMS2, ACC, etc.) cause such warnings with the Linux PID driver. I think they are related to one of the out of bounds warnings (value 302) caused by Proton 6.3. This warning is not raised when Proton 7 is running.

I will add here what I think is relevan, just in case it may help:

[ 4445.320267] ------------[ cut here ]------------
[ 4445.320267] WARNING: CPU: 18 PID: 16338 at ../drivers/hid/hid-core.c:1432 
implement+0x141/0x150
[ 4445.320270] Modules linked in:
(...)
[ 4445.320319] Call Trace:
[ 4445.320319]  <TASK>
[ 4445.320320]  hid_output_report+0x12d/0x170
[ 4445.320322]  usbhid_submit_report+0x178/0x3e0 [usbhid     43572dc9cc8ffc2e3442fbe8fca6cce6c769061c]
[ 4445.320326]  pidff_upload_effect+0x8b/0x610 [usbhid         43572dc9cc8ffc2e3442fbe8fca6cce6c769061c]
[ 4445.320328]  input_ff_upload+0x127/0x2d0
[ 4445.320330]  evdev_ioctl_handler+0x7a8/0xb20
[ 4445.320333]  __x64_sys_ioctl+0x8f/0xd0
[ 4445.320334]  ? syscall_trace_enter.isra.20+0xa9/0x1e0
[ 4445.320336]  do_syscall_64+0x58/0x80
[ 4445.320338]  ? evdev_ioctl_handler+0x6c/0xb20
[ 4445.320340]  ? __x64_sys_ioctl+0xae/0xd0
[ 4445.320342]  ? syscall_exit_to_user_mode+0x18/0x40
[ 4445.320343]  ? do_syscall_64+0x67/0x80
[ 4445.320344]  ? exc_page_fault+0x67/0x150
[ 4445.320346]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
[ 4445.320348] RIP: 0033:0x7f364008bc27

and:

proton:/home/slemke # uname -r
5.14.21-150400.24.21-default

Thatā€™s the usual raceroom with proton6, like I said, a lot of those I can see on dmesg but the game works normally (I think a small stutter when the kernel crash happens).

Dunno if that would be something to report upstream as my system is quite ā€˜specificā€™ and with workarounds.

Itā€™s not a crash, just a warning with a call trace. The relevant part should be slightly above the first line of the quote. Iā€™ve fixed the issue with Wine/Proton 7ā€™s SDL backend (the 32bit out of bounds issue). There seems to be another issue with Proton 6, something like: value 302 out of 8bit bounds, etc. This probably wonā€™t be fixed, since itā€™s a legacy version.

Anyway, once they accept a patch that enables the hidraw backend for SC devices, all these issues will disappear. This is also the only way for R3E to work on Proton 7, since the Sector 3 devs set the SC2ā€™s rotation angle programmatically through direct access to the device. So it crashes in hidapi.dll, if there is no such access. (Proton 6 has this enabled by default, while itā€™s dinput implementation relies on SDL - a completely different winebus architecture from Proton/Wine 7.)

Hello!
Do you have the MR of that patch? I would like to follow up and try R3E with Proton7 when that gets merged/accepted/released. Or just update this thread when/if that happens.

No MR yet. I plan to push the patch next week. Will let you know here.

Just pushed the PR. Can be followed here:

3 Likes

Well done for getting it merged!
I also have confirmed already that it works fine(proton experimental -> betas/bleeding edge beta), experimenal proton also got the DXVK2 release which fixes a lot of problems on raceroom, like the quite common shadow glitch.

thanks!