Genymobile / Genymobile/scrcpy
Issue with --turn-screen-off command
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
_Please read the [prerequisites] to run scrcpy._
[prerequisites]: https://github.com/Genymobile/scrcpy#prerequisites
_Also read the [FAQ] and check if your [issue][issues] already exists._
[FAQ]: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md
[issues]: https://github.com/Genymobile/scrcpy/issues
## Environment
- **OS:** Windows
- **Scrcpy version:** 3.1
- **Installation method:** Using git clone command
- **Device model:** Samsung Galaxy M31 SM-M315F/DS
- **Android version:** 12
## Describe the bug
When I start scrcpy using the --turn-screen-off command while my phone is unlocked, the phone's screen turns off as expected, and I can see the display on my laptop. However, if I physically lock my phone using the power button the screen is still turned off (that's not an issue), but if I press the power button again to wake it, the phone screen lights up and shows the lock screen. This also happens in the following scenarios:
1. If the phone is already locked, then unlocked, and locked again, pressing the power button turns the screen on.
2. If I manually press the power button after locking the phone, the screen turns on unexpectedly.
Interestingly, if I lock my phone using scrcpy (my phone has a feature where double-tapping the screen turns it off), and then again wake it again using scrcpy by right clicking the screen does not turn on the screen.
Expected Behavior: The phone screen should remain off when using --turn-screen-off mode, even if the power button is pressed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior on Windows with scrcpy 3.1, a Samsung Galaxy M31 on Android 12, and the --turn-screen-off command, including the listed lock and wake scenarios. Trace the handling of screen-off mode and power-button wake behavior; done means the phone display remains off when the power button is pressed while the mode is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c
- Domain
- cli, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100