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

Controller (and mouse) stops responding in ATS #15

Open
avengerx opened this issue Feb 28, 2023 · 2 comments
Open

Controller (and mouse) stops responding in ATS #15

avengerx opened this issue Feb 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@avengerx
Copy link
Owner

In American Truck Simulator (ATS), when force feedback is enabled, the controller will work for around 15 minutes and briefly stop responding. The keyboard works, but the mouse also stops responding, until after some moments (around 2 seconds) it becomes responsive again.

The game logs (Documents/American Truck Simulator/game.log.txt) the following when this happens:

<WARNING> [di8] Input buffer overflow for device 'mouse' (error code: 0x1).

Which suggests some kind of BUS overusage happens, building up a long command queue in the game, which leads to crashes.

Some places suggested in the game, that r_buffer_page_size setting from config.cfg could be increased from 10 to 60 to improve the situation, but it didn't help at all (and seems to be unrelated to the issue in all cases).

From an scs forums post from an employee:

"buffer overflow" happens when active and known controller feeds game by inputs, but those are not processed for some reason (game does not answer). it is completely opposite. there might be some indirect link though (eg strange scenarios like that controllers fighting over the bus or so).

The second part of the sentence suggests the driver could be flooding the USB bus and the game becomes unable to transmit instructions to (or from) its HID peripherals (joystick, mouse but not the keyboard), through DirectInput, which then stop responding and the buffer gets wiped.

@avengerx avengerx added the bug Something isn't working label Feb 28, 2023
@avengerx avengerx self-assigned this Feb 28, 2023
@avengerx
Copy link
Owner Author

Tried to reduce the delay between polls from the driver, only and only when the last run made alterations; to 1ms, while keeping it to 10ms when it didn't receive updates.

As expected, it didn't change the issue at all -- although it didn't really make it worse.

Switched it back, and then to a fixed 100ms and the issue was gone, but the effects perceived while playing the game became very strange, not necessarily laggy, but somewhat erratic.

Before deeming the issue as fixed, will try with lower values (in ms) of 20, 15, 25, etc. The "sweet spot" here could not necessarily apply for other games though and the driver can't really tell which game is commanding it to make game-specific fixes.

@avengerx
Copy link
Owner Author

avengerx commented Mar 1, 2023

After several attempts I don't see much can be done. The game floods the driver with different ffb intensities all the time, so even if, say, the engine is at a constant revolution/s, the game will be insistently sending and resetting the effect strength to approximate values close to each other, as if "brute forcing" the engine vibration, or something like it.

I believe the solution for this would be to completely disable force feedback in the game and write a plug in (using SCS SDK). The game effects as they are seem unsuitable for rumble controllers, anyway.

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

No branches or pull requests

1 participant