Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.3k stars 10.74k forks source link

scrcpy'sdisplay freeze when reconnecting remote Windows RDP session #4516

Open jackyzy823 opened 11 months ago

jackyzy823 commented 11 months ago

Environment

Describe the bug I'm running scrcpy on a remote windows machine , the machine connects to an android device (Pixel 6) via USB. After i disconnect and reconnect the machine via RDP , the display of the scrcpy is frozen.

I'm not sure that the scrcpy is still connecting with the android device. But the screen of android device turns off when the time i closed scrcpy after reconnecting the window machine and finding out that display is frozen.

jackyzy823 commented 9 months ago

It looks like SDL's problem ?

Ref: https://stackoverflow.com/questions/4050110/sdl-remote-desktop


Or direct3d?

https://stackoverflow.com/questions/36449735/remote-desktop-behavior-with-3d3-device-and-rdp-window-minimize https://stackoverflow.com/questions/5493200/terminal-session-when-minimized-disconnected-returns-a-blank-screen-upon-capturi/35193691

Some more reference: https://git.openjdk.java.net/jfx/pull/430 https://www.mail-archive.com/search?l=openjfx-dev@openjdk.java.net&q=subject:"Re\%3A+RFR\%3A+8239589\%3A+JavaFX+UI+will+not+repaint+after+reconnecting+via+Remote+Desktop"&o=newest&f=1

jackyzy823 commented 9 months ago

Using "--render-driver=software" or “--render-driver=opengl” solve the problem. (So the problem might be direct3d)