DanielOgorchock / joycond

userspace daemon to combine joy-cons from the hid-nintendo kernel driver
GNU General Public License v3.0
338 stars 68 forks source link

Increase polling rate #135

Open bemug opened 6 months ago

bemug commented 6 months ago

I'm kinda new to this. I would like to set a higher polling rate for the Switch Pro Controller, similar to what is done for the gamecube adapter here.

I tried with my Switch Pro Controller plugged by USB.

With evhz I get the Nintendo Switch Pro Controller IMU polling between 500000Hz and 1000000Hz by doing nothing, being accelerometers I don't really care. The Nintendo Switch Virtual Pro Controller only polls between 62Hz and 125Hz when pressing the buttons.

...
Nintendo Switch Virtual Pro Controller: Latest   125Hz, Average    81Hz
Nintendo Switch Pro Controller IMU: Latest  1000000Hz, Average  539090Hz
Nintendo Switch Pro Controller IMU: Latest    62Hz, Average  531278Hz
Nintendo Switch Virtual Pro Controller: Latest    62Hz, Average    83Hz
Nintendo Switch Pro Controller IMU: Latest  1000000Hz, Average  546902Hz
Nintendo Switch Pro Controller IMU: Latest  1000000Hz, Average  554715Hz
Nintendo Switch Pro Controller IMU: Latest    62Hz, Average  539091Hz
Nintendo Switch Pro Controller IMU: Latest  500000Hz, Average  546902Hz
Nintendo Switch Pro Controller IMU: Latest  1000000Hz, Average  554715Hz
Nintendo Switch Pro Controller IMU: Latest   125Hz, Average  539092Hz
Nintendo Switch Pro Controller IMU: Latest  500000Hz, Average  546902Hz
Nintendo Switch Pro Controller IMU: Latest  1000000Hz, Average  546902Hz
...

First and foremost I'm not sure this is correct.

Now I looked into the Arch wiki, displayed my polling rate :

$ systool -m usbhid -A jspoll
Module = "usbhid"

    jspoll              = "0"

Override it to 1 by modprobing usbhid this way : modprobe usbhid jspoll=1

$ systool -m usbhid -A jspoll
Module = "usbhid"

    jspoll              = "1"

And still got the same polling rate in evhz.


I have 2 questions :

Thanks !