Can fast USB polling be slower?

For topics which do not fit in other specific forums.
misterrocks
Posts: 150
Joined: Tue Jan 11, 2022 1:43 am
Has thanked: 55 times
Been thanked: 3 times

Can fast USB polling be slower?

Unread post by misterrocks »

Is the default fast USB polling on or off?

I set mine to on and it seemed either the same or slightly higher input lag. Can fast USB polling ever increase input lag?

FoxbatStargazer
Top Contributor
Posts: 1019
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

Re: Can fast USB polling be slower?

Unread post by FoxbatStargazer »

Some devices don't react well to it, yes. Either minimal change or even additional problems.

The scripts changes the file /linux/u-boot.txt on your SD card. The fast one uses the number 1000 for 1ms polling. You can change it to 500 for 2ms, 250 for 4ms, etc.

misterrocks
Posts: 150
Joined: Tue Jan 11, 2022 1:43 am
Has thanked: 55 times
Been thanked: 3 times

Re: Can fast USB polling be slower?

Unread post by misterrocks »

Do you know the number used for fast polling "off"? Do you know which is default?

User avatar
Retro-Nerd
Posts: 279
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 12 times
Been thanked: 80 times

Re: Can fast USB polling be slower?

Unread post by Retro-Nerd »

Input lag

USB controllers usually have an interval value which the host (MiSTer Linux kernel) respects to poll their inputs at. Most USB devices can actually perform better by being polled more often without any side effects.

To set a higher USB polling rate, you need to go to the "linux" subdirectory on your SD card and rename "u-boot.txt_example" to "u-boot.txt". The aforementioned file contains the following options, which should only be changed if you are encountering problems:

v=loglevel=4 usbhid.jspoll=1 xpad.cpoll=1

loglevel: 4 is the default value. You can set this to 9 to get debugging messages with dmesg command via SSH. If you just want to know which values of usbhid.jspoll and xpad.cpoll are applied to your controller, there are easier ways to achieve this (see below).

usbhid.jspoll: specifies the interval for USB HID controllers, usually DirectInput.

0 is the default value MiSTer uses (even when there is no "u_boot.txt"). In this case the requested value from the controller is used.
1 is the recommended value (which means 1000/1 = 1000 Hz polling rate). However, if you ever encounter any issues, try higher integer values. The higher the interval, the higher the possible lag. This shouldn't go above 8 (which means 1000/8 = 125 Hz polling rate).
To see which value is applied to your controller, you can run systool -m usbhid -A jspoll from the Linux shell.

xpad.cpoll: specifies the interval for USB XInput controllers. Most popular controllers use this. There is no practical difference here. XInput is for Microsoft's Xbox consoles and PC.

0 is the default value MiSTer uses (even when there is no "u_boot.txt"). In this case the requested value from the controller is used.
1 is the recommended value (which means 1000/1 = 1000 Hz polling rate). However, if you ever encounter any issues, try higher integer values. The higher the interval, the higher the possible lag. This shouldn't go above 8 (which means 1000/8 = 125 Hz polling rate).
To see which value is applied to your controller, you can run systool -m xpad -A cpoll from the Linux shell.

Post Reply