Skip to content

evhz usage

Gareth Francis edited this page Oct 1, 2022 · 5 revisions

EVHZ Usage

EVHZ is a utility written by Ian Kelling for verifying the polling rate of mice. With a few minor changes we can use the same tool for other input devices.

My fork: https://github.com/geefr/evhz

Original Project URL: https://git.sr.ht/~iank/evhz

If you clone from the original URL, run the following

# By default evhz only handles mice-like devices, so we need to make some tweaks
# In short we need to remove the check that event.type is EV_REL or EV_ABS
# This little command should do this for you
sed -i 's/event.type == EV_REL || event.type == EV_ABS/1/g' evhz.c

Verifying the polling rate of any device

# First go grab a copy of evhz
git clone https://github.com/geefr/evhz.git

cd evhz

# Now run evhz. It should show some output any time an event happens, be it mouse movement or any button press
# evhz needs to run as root, so this will ask you for a password when run
./run

EVHZ will display a rate based on the time between 2 consecutive inputs, so in order to prove that your polling works you need to trigger 2 input events within 1ms of each other.

  • Start spamming your input
  • Jumps work well, as you just need 2 inputs very close together, just jump on all the arrows repeatedly
  • If you see multiple lines printed containing the phrase 'Latest 1000hz' then congratulations! You don't have any polling issues on the device itself, move on to testing within Stepmania.
  • If you don't see 1000Hz in the output, or it seems to be capped at 125Hz, 250Hz, or 500Hz then you've got some limit on the device's polling rate.
Clone this wiki locally