Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
111.51k stars 10.69k forks source link

scrcpy freeze due to orientation switch (and work-around) #4459

Open ballo opened 11 months ago

ballo commented 11 months ago

Environment

Describe the bug If the screen orientation changes just after getting past the lock screen (I use swipe, and have to do it blindly as the screen goes black), 9/10 times scrcpy will freeze.

I never had this problem with Android 9 on an S8. It was and continues to be rock-solid on that phone.

There is a work-around: Use an app to lock the orientation. I use Orientation Control. I have to unlock it when using the phone as a regular smart phone so this is less than ideal, but it beats running scrcpy 10 times on average to try to get past the freeze.

adb connect `netstat -nr |head|grep default|awk '{ print $2 }'` ; scrcpy --stay-awake  --power-off-on-close
already connected to 192.168.20.163:5555
scrcpy v2.2 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.20.163:5555             device  Pixel_7
/opt/homebrew/Cellar/scrcpy/2.2/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 82.2 MB/s (64363 bytes in 0.001s)
[server] INFO: Device: [Google] google Pixel 7 (Android 14)
INFO: Renderer: metal
INFO: Texture: 1080x2400
rom1v commented 11 months ago

I think this can be fixed by 7e3b9359322fff65bd350febfdc02a76186981cd. Could you please test the current dev branch?