• Home

    • Information
    • Webpage styling
  • Installation

    • Pre-installation
    • Installation
    • Configuration
  • Post-installation

    • General recommendations
    • Performance
    • Gaming
      • Mouse polling rate
      • Binaural Audio with OpenAL
      • Tuning PulseAudio
    • Security

Post-installation Guide


Gaming

Mouse polling rate

Mouse polling rate determines how often the mouse sends information to your computer.

Hz 1000 500 250 125
ms 1 2 4 8

If the polling rate is 125 Hz, the mouse position will be updated every 8 milliseconds.

In situations where lag is critical - for example games - some users decrease the interval to as little as possible. However, this puts more load on the CPU, so care should be taken when adjusting this value.

You can check the polling rate by installing evhz-gitAUR and executing as root:


evhz

Now move the mouse continuously in large circles until the displayed Average stabilizes then press Ctrl+c to exit.

To configure the polling rate use the mousepoll option of the usbhid kernel module. The default value is 0 which means the module uses the interval requested by the device(s).

The current value of the option can be verified with:


systool -m usbhid -A mousepoll
Module = "usbhid"

    mousepoll           = "0"

To change the configuration create the following file:



options usbhid mousepoll=1

This example requests a mouse polling rate of 1000Hz. Similarly, you may change jspoll or kbpoll to change the polling rate of gamepads/joysticks or keyboards.

Known issues

  • In some cases, you might find your mouse polling at half the requested rate. See this forum post for more information.

  • The USB 3 driver xhci-hcd may be ignoring the usbhid mousepoll setting. See the linux-usb mailing list message and Bug.

  • Editor's note: I had this issue with my Logitech G502. What I had to do was install piper to configure my mouse polling rate.

  • Having a mouse with a high poll rate and using wine can result in game lag. Unfortunately there is currently no fix for users with a combination of a mouse with a high poll rate and only a USB3 xHCI Controller.

    A workaround is to use a mouse with a lower poll rate.

Binaural Audio with OpenAL

For games using OpenAL, if you use headphones you may get much better positional audio using OpenAL's HRTF filters. To enable, run the following command:


echo "hrtf = true" >> ~/.alsoftrc

Tuning PulseAudio

If you are using PulseAudio, you may wish to tweak some default settings to make sure it is running optimally.

Pulseaudio is built to be run with realtime priority, being an audio daemon. However, because of security risks of it locking up the system, it is scheduled as a regular thread by default. To adjust this, first make sure you are in the audio group. Then, uncomment and edit the following lines in /etc/pulse/daemon.conf:



# high service priority
high-priority = yes

# nice level
nice-level = -11

# realtime priority
realtime-scheduling = yes
realtime-priority = 5

# higher quality remixing for better sound
resample-method = speex-float-10

and restart pulseaudio.


Axis Linux Documentation is distributed under GNU Free Documentation License 1.3 or later unless otherwise noted.

Copyright © 2021 - Axis Linux