Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
111.56k stars 10.69k forks source link

device screen stays on displaying a black screen #2705

Open PallavRastogi opened 3 years ago

PallavRastogi commented 3 years ago

Environment

Describe the bug

The device screen turns on for a moment when the command is run (shows home screen) then it continuously displays a black screen while remaining "turned on"/ I can control it just fine from my laptop. This issue was not present before, I was using scrcpy for around 2 weeks and it was working fine, but today suddenly this bug has arised The device's battery is weak so it is always connected to a power source. (I have ensured that "stay awake" is turned off in developer options)

No similar issue is there before using scrcpy, but once the commands are run, the display stays on showing black screen even after closing the scrcpy terminal. also, I have set display turn off in 15 seconds.

C:\Users\Admin>adb connect 192.168.49.1:5555
already connected to 192.168.49.1:5555

C:\Users\Admin>scrcpy --serial 192.168.49.1:5555 --turn-screen-off --force-adb-forward --always-on-top -b2M -m600 --max-fps 15
INFO: scrcpy 1.19 <https://github.com/Genymobile/scrcpy>
G:\PALLAV\moto e\platform-tools\scrcpy-server: 1 file pushed, 0 skipped. 14.6 MB/s (37330 bytes in 0.002s)
27183
[server] INFO: Device: motorola Moto E (Android 8.1.0)
INFO: Renderer: direct3d
INFO: Initial texture: 336x600
[server] INFO: Device screen turned off

image

rom1v commented 3 years ago

There were some bugs related to power mode on some old ROMs: https://github.com/Genymobile/scrcpy/issues/175#issuecomment-497946596

I even disabled the feature to turn the screen on for a while: 8c8649cfcd710859ce18eab557ed2af8cedb9a42 Then reverted: dcde578a50ffb9d2594c4764a067e9dd328bf55c

PallavRastogi commented 3 years ago

so how to fix this bug?

rom1v commented 3 years ago

It is probably a bug in your ROM...