scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Black screen after connection

Open yyy33 opened this issue 4 years ago • 7 comments

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

Environment

  • OS: Windows
  • scrcpy version: 1.17
  • installation method: Windows release
  • device model:huawei honor 9
  • Android version: 9

Describe the bug Every time I successfully connect the phone, the screen is always black, and I need to click with the mouse to display the phone screen

C:\>adb connect 192.168.0.3:3344
already connected to 192.168.0.3:3344

C:\>adb shell -t "dumpsys window policy | grep -q isStatusBarKeyguard=true && { input keyevent 82; input keyevent 82; input text $(base64 -d <<< NTkyNAo=); }"

C:\>adb shell -t settings put system screen_off_timeout 2147483647

C:\>scrcpy --shortcut-mod=lctrl,lalt --turn-screen-off --show-touches --stay-awake --push-target /sdcard/Download
INFO: scrcpy 1.17 <https://github.com/Genymobile/scrcpy>
C:\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 27.6 MB/s (34930 bytes in 0.001s)
[server] INFO: Device: HUAWEI STF-AL10 (Android 9)
INFO: Renderer: direct3d
INFO: Initial texture: 1080x1920
[server] INFO: Device screen turned off
[server] INFO: Device clipboard set

yyy33 avatar Apr 27 '21 02:04 yyy33

Also without --turn-screen-off?

rom1v avatar Apr 27 '21 05:04 rom1v

Also without --turn-screen-off?

Yes, I tried it. The black screen I am talking about here is the window on the computer screen, not the black screen of the mobile phone

yyy33 avatar Apr 27 '21 06:04 yyy33

The black screen I am talking about here is the window on the computer screen, not the black screen of the mobile phone

Yes, but it could impact screen refreshing (#836).

Yes, I tried it.

Scrcpy passes a specific option to the encoder to avoid this problem: https://github.com/Genymobile/scrcpy/blob/498ad23e9804cd7d7bb56bb1cd0d26b88e1830b9/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L209-L210

So I guess your device doesn't handle it properly (it's a bug).

rom1v avatar Apr 27 '21 06:04 rom1v

The black screen I am talking about here is the window on the computer screen, not the black screen of the mobile phone

Yes, but it could impact screen refreshing (#836).

Yes, I tried it.

Scrcpy passes a specific option to the encoder to avoid this problem:

https://github.com/Genymobile/scrcpy/blob/498ad23e9804cd7d7bb56bb1cd0d26b88e1830b9/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L209-L210

So I guess your device doesn't handle it properly (it's a bug).

Yeah,it seems that I haven't encountered this problem on Linux, but I'm not sure. I need to verify it.

yyy33 avatar Apr 27 '21 06:04 yyy33

I am facing the same problem on Linux mint mate 20.1 With scrcpy version 1.12.1. I tried running scrcpy --render-driver=opengles2 but it says that's not an option.

shubham-indalkar avatar Aug 04 '22 07:08 shubham-indalkar

With scrcpy version 1.12.1.

It's a very old version. Uninstall the package from your distribution, and install the latest version manually: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#simple

rom1v avatar Aug 04 '22 07:08 rom1v

With scrcpy version 1.12.1.

It's a very old version. Uninstall the package from your distribution, and install the latest version manually: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#simple

Thanks. I tried all drivers but only opengles2 and software are working. Opengles2 is laggy, I'm using software. Thanks again.

shubham-indalkar avatar Aug 04 '22 07:08 shubham-indalkar