scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Through scrcpy my mouse and keyboard input lags

Open spellsleeper opened this issue 4 years ago • 7 comments

  • [ x ] I have read the FAQ.
  • [ x] I have searched in existing issues.

Environment

  • OS: Windows 10
  • scrcpy version: 1.17(win64)
  • installation method: Windows release...
  • device model: samsung SM-T515
  • Android version: 11
  • PC device: Fujitsu Celsius H780

Describe the bug Most of the time when I use scrcpy my input is delayed (on the whole PC not only on the mobile device). Sometimes it is also necessary to change the USB port of the keyboard because it does not respond at all.

Unfortunately I do not get any errors

spellsleeper avatar Sep 22 '21 07:09 spellsleeper

having the same issue on my Windows 64 bit.

When the issue occurs, most of time the mouse/keyboard can get freeze for a period sometimes. mouse will stop moving for a while then suddenly continue to move keyboard may keep input characters looks like the key is sticked.

if scrcpy closed, these issue disappeared.

and sometimes the mouse stop moving at all unless unplug and replug the usb cable.

yudenzel avatar Jan 12 '22 07:01 yudenzel

Run scrcpy -Vverbose and keep the terminal open. Are the logs delayed when you press a key, or only the actions on the device?

rom1v avatar Jan 12 '22 08:01 rom1v

for my issue, it's not the action on device get delayed, it's the mouse and keyboard get frozen on the host.

I tried reduce the max fps to 15, looks like the symptom is gone.

yudenzel avatar Jan 19 '22 06:01 yudenzel

Hi, I have the same problem. When Scrcpy is on screen every input on my keyboard can get stuck. For example if the mirroring window is open and i write something in a PC application the same letter gets repeated multiple times. Previously everything worked fine but even if i try an older versione of the application the issue still remains. Now i'm on version 1.24.

GZKPT avatar Jun 15 '22 07:06 GZKPT

Try with an older SDL2.dll (replace the one from an older version of scrcpy).

rom1v avatar Jun 15 '22 11:06 rom1v

I tried SDL 2.0.16 (from Scrcpy 1.19) but still no luck.

GZKPT avatar Jun 15 '22 14:06 GZKPT

Apologies for necro-ing this issue, but I had been encountering this problem exactly as explained by the others in this thread after years of using scrcpy with no issues.

In my case, the cause of the lag was because my mouse, keyboard, and phone were connected to a USB hub that was connected to my computer instead of being plugged in directly. Plugging either my mouse & keyboard or my phone directly into a usb port on my computer eliminated the lag. I guess scrcpy + input devices result in too much data being sent through a single USB C port.

Hemkinator avatar Apr 22 '24 18:04 Hemkinator