scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

scrcpy - WARN: Device disconnected - after few seconds

Open marlborek opened this issue 2 years ago • 5 comments

Hi,

my scrcpy disconnects after few seconds. When I stop the file transfer on the phone and enable it again, the scrcpy connects, but again only for a few seconds.

I tried scrcpy versions 2.3.1 and 1.18. The same result. I tried different cables and USB ports.

c:\scrcpy2>scrcpy scrcpy 2.3.1 https://github.com/Genymobile/scrcpy INFO: ADB device found: INFO: --> (usb) 6twgprvc5hkzlzqo device Redmi_Note_8_Pro c:\scrcpy2\scrcpy-server: 1 file pushed, 0 skipped. 22.5 MB/s (66007 bytes in 0.003s) [server] INFO: Device: [Xiaomi] Redmi Redmi Note 8 Pro (Android 11) INFO: Renderer: direct3d INFO: Texture: 1080x2336 WARN: Device disconnected

Any tips? How can I make it work? What can I try to fix this?

marlborek avatar Jan 05 '24 09:01 marlborek

and it works fine over WiFi, but I still would like to use the cable connection.

marlborek avatar Jan 05 '24 09:01 marlborek

These are adb disconnections.

Run adb shell or adb logcat in a separate terminal, they will be closed at the same time as scrcpy due to the disconnection.

This is typically related to your USB (cable or port): https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-disconnected

But if you already tried other cables and ports, I don't know.

rom1v avatar Jan 05 '24 09:01 rom1v

for mine if i run adb shell without scrcpy my session remain connected, but when i run scrcpy with adb shell when my device disconnected ( after a few seconds ), adb shell disconnected too @rom1v

DJafari avatar Jan 10 '24 12:01 DJafari

If there is too much bandwidth, your USB port/cable might fail. Try with another cable/port.

Or it might be the adb server crashing on the device (check adb logcat).

rom1v avatar Jan 10 '24 15:01 rom1v

and it works fine over WiFi, but I still would like to use the cable connection.

I did the opposite, using a scrcpy USB cable it worked smoothly and if I used a WiFi connection it was lost like the error you mentioned. if I want to reconnect with just a WiFi connection I have to do everything from the beginning again using a USB cable and then switch to a WiFi connection even though in the end it's the same, it will disconnect automatically after a few minutes.

I use Realme 8 Pro and Sony Vaio Laptop.

mfathurr avatar Apr 15 '24 16:04 mfathurr