Genymobile / Genymobile/scrcpy

Scrcpy stays black after a power off/lock on phone

Open
#6,491 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

> I have been experiencing this issue as well. scrcpy's display of the Android device will go black (as if the screen is off), it will display again on a right-click but only if done within a few seconds after it goes black. All keyboard controls still work when the display goes black. MOD+P will mimic the power button, etc. and the actual device responds, but scrcpy's display remains black until I close out and reconnect.
>
> No apps or anything on my lockscreen have changed that trigger the secure flag where the content can't be mirrored, so I think this is not the issue here. In the previous version, I didn't have this issue. I would be able to right-click or MOD+P whenever and the display would appear normally on my PC. Now, I'm limited to a few seconds after or it doesn't work.
>
> My workaround for now was to create an automated quick tile on Android to toggle screen timeout (like Caffeine on LineageOS, etc.) to never when scrcpy's connected.
>
> Pixel 6 Pro on Android 16 latest beta version

_Originally posted by @numberneuf in [#5945](https://github.com/Genymobile/scrcpy/issues/5945#issuecomment-2813928182)_

Scrcpy version 3.3.3
Windows 11
CMD: `scrcpy -no-audio --shortcut-mod=rctrl`

i still experience this issue, MOD+Shift+r didn't work, i have tested it on `scrcpy -S -no-audio --shortcut-mod=rctrl` also the same, need to close the app and reconnect to fix, i do use the `--stay-awake` flag when i need the phone for a long time but when not need this issue is roadblock

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named in the report. Reproduce on a Pixel 6 Pro with Android 16 beta using scrcpy 3.3.3 and the reported Windows command, then compare normal lock/power-off recovery with MOD+Shift+r and --stay-awake. Done means the display recovers without closing and reconnecting while keyboard controls continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.