scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Screen remains off when folded

Open limacohen opened this issue 3 years ago • 3 comments

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

Environment

  • OS: Windows 10 Pro
  • scrcpy version: 1.17
  • installation method: choco install scrcpy
  • device model: Samsung Galaxy Z Flip (SM-F700F)
  • Android version: 11 (One UI 3.0)

Describe the bug I want to use scrcpy while my phone screen is folded/closed. However it seems unresponsive to any input from either scrcpy or adb, it just stays off or shows a fading image for a few seconds. I've obviously tried RMB and all combinations of --stay-awake and --turn-screen-off. I've also tried sending all kinds of adb commands (mostly key inputs) to power the screen back on, to no avail. Also, all on/off combinations of auto-lock and always-on display. The result is always the same: screen is off or a still image of the always-on display. I was able to control the little external screen targeting it with --display while the phone was folded, but that's it.

I know this is an edge case, but as folding phones rise in popularity (at least I hope so, I love the form factor of this one) I think using scrcpy would be a very useful way to avoid unnecessary mechanical wear.

limacohen avatar Feb 28 '21 20:02 limacohen

Didn't think I'd find something so exactly matching my situation.

I have z flip3 5G. While I don't know what "RMB" is, and I have little experience with android+adb. Any developer or contributor to scrcpy, please chime in to confirm/deny speculation:

I have a feeling that it is pretty impossible to accomplish this. My guess is that this functionality isn't even exposed, it's a low-level power-controller function on the manufacturer level. Maybe it's low-level enough that changing it has unexpected volatile effects. It's possible it works like a laptop screen closing and shutting off. Not that Windows is any similar, but there are a sequence of kernel events that occur when the lid is closed or opened.

I looked at the output of "adb shell dumpsys display" and there are additional displays with "has_content=false" , while conveniently the displays with "has_content=true" are the cover screen and unfolded display. Also relevant is "mState=DOZE_SUSPEND" --- maybe it works like sleep mode in that it would require a more involved wake-on-lan (magic-packet?) solution.

I've attached the log.

other seemingly relevant vars are: display-output.txt

blockScreenOn coverType mPowerRequest dozeScreenState

also this apparently: https://github.com/Genymobile/scrcpy/issues/816

marseille avatar Apr 18 '22 13:04 marseille

While I don't know what "RMB" is

Right Mouse Button.

Thank you for your contribution, I'm looking forward to the day this gets sorted out.

limacohen avatar Apr 18 '22 16:04 limacohen

I have the same issue with my Cosmo Communicator when the cover is closed.

vinc17fr avatar Jul 19 '22 22:07 vinc17fr