Genymobile / Genymobile/scrcpy

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

Open
#4,459 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
150k
Forks
13.8k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

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

Environment

  • OS: MacOS Ventura
  • scrcpy version: 2.2 (latest on brew)
  • installation method: brew
  • device model: Pixel 7
  • Android version: 14

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the freeze with the reported Pixel 7 on Android 14, unlocking immediately after scrcpy connects and allowing the orientation to change. Use the reported adb and scrcpy invocation, then compare it with orientation locked; done means scrcpy remains responsive through the unlock and orientation transition.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
desktop, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.