Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty manually waking screen after using scrcpy --stay-awake --turn-screen-off --power-off-on-close #4774

Open
ballo opened this issue Mar 20, 2024 · 2 comments

Comments

@ballo
Copy link

ballo commented Mar 20, 2024

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

Environment

  • OS: MacOS Ventura
  • scrcpy version: 2.4
  • installation method: brew
  • device model: Pixel 7
  • Android version: android 14 (I'm looking into downgrading from this garbage)

Describe the bug
I don't know why, but after using scrcpy the screen stays powered off and I can't wake it with the power button. I can feel it turning on like the camera, but the screen stays blank (black). I have to reconnect it to adb and run scrcpy again to shake it out of this condition. Basically makes the phone unusable.

@rom1v
Copy link
Collaborator

rom1v commented Mar 20, 2024

The method to turn the screen off has changed in Android 14: #4456

In the end, it calls SurfaceControl.setDisplayPowerMode(binder, mode);:

allOk &= SurfaceControl.setDisplayPowerMode(binder, mode);

How the device reacts is device specific, but pressing the POWER button should turn it on (if scrcpy is closed).

What if you run scrcpy --turn-screen-off without --power-off-on-close?

@ballo
Copy link
Author

ballo commented Mar 26, 2024

Since I don't use the computer and phone in the same room it's proving difficult to nail down what triggers this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants