# BlinkStick USB performance with node-hid on Linux only

**URL:** <https://forums.blinkstick.com/t/blinkstick-usb-performance-with-node-hid-on-linux-only/922>\
**Category:** Uncategorized\
**Created:** [February 26, 2018, 9:53pm UTC](https://forums.blinkstick.com/t/blinkstick-usb-performance-with-node-hid-on-linux-only/922 "2018-02-26T21:53:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcerisano](https://forums.blinkstick.com/user_avatar/forums.blinkstick.com/dcerisano/32/460_2.png) [@dcerisano](https://forums.blinkstick.com/u/dcerisano)\
**Post date:** [February 26, 2018, 9:53pm UTC](https://forums.blinkstick.com/t/blinkstick-usb-performance-with-node-hid-on-linux-only/922/1 "2018-02-26T21:53:29Z")

</div>

Noticing lag and intermittent stalling when sending commands to BlinkStick Flex using the `node-hid` github branch. Not occurring on Windows, expect this is a Linux `ioctl` issue specific to `node-hid`.

The Flex is connected to a 30 led WS2812 strip.

Results of Testing  
USB 2.0 (BLACK) lag and stalling  
USB 3.0 (BLUE - LOW POWER) no lag but stalling  
USB 3.0 (RED - HIGH POWER) no lag no stalling

Is there a configuration parameter for the various USB types?  
I have not tried powering the strip independently of USB.

---

<div class="post-metadata">

**Author:** ![dcerisano](https://forums.blinkstick.com/user_avatar/forums.blinkstick.com/dcerisano/32/460_2.png) [@dcerisano](https://forums.blinkstick.com/u/dcerisano)\
**Post date:** [February 27, 2018, 4:42am UTC](https://forums.blinkstick.com/t/blinkstick-usb-performance-with-node-hid-on-linux-only/922/2 "2018-02-27T04:42:17Z")

</div>

I found the cause of the lag.

I am using the `node-hid` code branch and getting an `ioctl` protocol error (which is just a warning)

> ioctl (SFEATURE): Protocol error

in ` BlinkStick.prototype.setFeatureReport`

Its `retryTransfer` function fires several times and slows execution.  
The data always gets successfully sent, but sometimes `iotcl` throws the above warning causing the intermittent lag.

I simply removed the `retryTransfer` function. These warnings are still occurring, but no lag.  
The lag was just much more pronounced on slower low power USB connections.

The intermittent stall (frame skip) is still occurring (averages about 10 times per minute) on the slower low power USB connections (black and blue) with this actual error being thrown:

> ioctl (SFEATURE): Cannot send after transport endpoint shutdown

The high power red USB3.0 connection performs flawlessly, so I will just observe this as a minimum requirement.

For my purposes, this is an acceptable solution, and it avoids plunging into the depths of `ioctl`.  
None of this is a problem on Windows.

---

<div class="post-metadata">

**Author:** ![dcerisano](https://forums.blinkstick.com/user_avatar/forums.blinkstick.com/dcerisano/32/460_2.png) [@dcerisano](https://forums.blinkstick.com/u/dcerisano)\
**Post date:** [March 2, 2018, 7:42am UTC](https://forums.blinkstick.com/t/blinkstick-usb-performance-with-node-hid-on-linux-only/922/3 "2018-03-02T07:42:41Z")

</div>

Suspecting the root of the issue is that I have a new AMD4/Ryzen system and the Linux chipset firmware is immature.

Will post back as upgrades are released (which is frequent for AMD4). Hopefully this is also related to the WebUSB issues I am having on Linux.

Again, no problems at all on Windows.

This
