Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.48k stars 10.76k forks source link

Console pause on INFO: Renderer: direct3d #4091

Open jnegreterom opened 1 year ago

jnegreterom commented 1 year ago

Environment

Describe the bug Start the bat and the console pauses on INFO: Renderer: direct3d

scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
C:\Users\Juan Negrete\Documents\scrcpy-win64-v2.0\scrcpy-w... file pushed, 0 skipped. 27.9 MB/s (52867 bytes in 0.002s)
[server] INFO: Device: Xiaomi Mi 9T (Android 11)
INFO: Renderer: direct3d
rom1v commented 1 year ago

Does it work with scrcpy --no-audio? With another video encoder (see scrcpy --list-encoders)?

jnegreterom commented 1 year ago

Does it work with scrcpy --no-audio? No, still the same issue

With another video encoder (see scrcpy --list-encoders)? How I used this one?

I try with scrcpy --render-driver=opengl and the issue is now

scrcpy 2.0 https://github.com/Genymobile/scrcpy C:\Users\Juan Negrete\Documents\scrcpy-win64-v2.0\scrcpy-w... file pushed, 0 skipped. 58.1 MB/s (52867 bytes in 0.001s) [server] INFO: Device: Xiaomi Mi 9T (Android 11) INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 Compatibility Profile Context 23.4.3.230420 INFO: Trilinear filtering enabled

but doesn't open the phone's window

rom1v commented 1 year ago

With another video encoder (see scrcpy --list-encoders)?

How I used this one?

See https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#codec

LeonTheBigFat commented 1 year ago

I'm having the same issue on scrcpy v. 2.1.1 with a Xiaomi Poco X3 NFC on the xiaomi.eu MIUI 14.0.2.0 Global ROM

Similar issue appears on v. 1.25 and v. 1.21 where it says "INFO: Initial texture: 1080x2400" but still no window output

C:\Users\leont\Desktop\scrcpy-win64-v2.1.1\scrcpy-server: ...file pushed, 0 skipped. 231.9 MB/s (56995 bytes in 0.000s) [server] INFO: Device: [Xiaomi] POCO M2007J20CG (Android 12) INFO: Renderer: direct3d

C:\Users\leont\Desktop\scrcpy-win64-v2.1.1\scrcpy-server: ...file pushed, 0 skipped. 168.9 MB/s (56995 bytes in 0.000s) [server] INFO: Device: [Xiaomi] POCO M2007J20CG (Android 12) INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 NVIDIA 537.34 INFO: Trilinear filtering enabled

C:\Users\leont\Desktop\scrcpy-win64-v1.25>scrcpy --render-driver opengl scrcpy 1.25 https://github.com/Genymobile/scrcpy C:\Users\leont\Desktop\scrcpy-win64-v1.25\scrcpy-server: 1 file pushed, 0 skipped. 72.2 MB/s (42151 bytes in 0.001s) [server] INFO: Device: Xiaomi M2007J20CG (Android 12) INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 NVIDIA 537.34 INFO: Trilinear filtering enabled INFO: Initial texture: 1080x2400

Screen lights up but no window opens or anything (screen on my phone has no output hence why I'm trying to use scrcpy, it's not a broken screen but instead a software issue I'm trying to diagnose with the help of this)

yume-chan commented 1 year ago

If your device screen doesn't display anything, then Scrcpy can't capture anything from it.

LeonTheBigFat commented 1 year ago

If your device screen doesn't display anything, then Scrcpy can't capture anything from it.

Screenshots work fine though, or does scrcpy work on a different principle? Not 100% sure how it works, and facing the issue someone else has while not knowing why either party is encountering it is making me pretty pessimistic.

For now, the only solution I see is a factory reset, which I'm really trying to avoid because I simply do not have the patience for backing up and restoring personal data.

rom1v commented 1 year ago

Have you tried with another encoder as suggested above?

Also, you should pass --turn-screen-off if you have no screen (or if it is broken).

LeonTheBigFat commented 1 year ago

Have you tried with another encoder as suggested above?

Also, you should pass --turn-screen-off if you have no screen (or if it is broken).

I have tried with another encoder (you can see in my logs that I tried with both direct3d and opengl) I've also just tried passing "--turn-screen-off" to no avail

I managed to get access to the devices screen by using TeamViewer and from there on I flashed a Magisk boot.img

After doing so, my screen suddenly came back to life (but videos still aren't playing, which was my main problem in the first place and after reflashing my custom ROM the screen ended up not wanting to display anything)

I'm assuming that I'm missing codecs and encoders or whatever, hence why I'm unable to play any videos on any app Scrcpy still does not work even though the display does work now

I'm gonna assume this is an internal issue, and not something to do with scrcpy itself

rom1v commented 1 year ago

I have tried with another encoder (you can see in my logs that I tried with both direct3d and opengl)

Nope, direct3d and opengl are not encoders, but render drivers.

To change the encoder: https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#encoder

LeonTheBigFat commented 1 year ago

I have tried with another encoder (you can see in my logs that I tried with both direct3d and opengl)

Nope, direct3d and opengl are not encoders, but render drivers.

To change the encoder: https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#encoder

Console pause upon running scrcpy --list-encoders C:\Users\leont\Desktop\scrcpy-win64-v2.1.1>scrcpy --list-encoders scrcpy 2.1.1 https://github.com/Genymobile/scrcpy INFO: ADB device found: INFO: --> (usb) c9cf6dce device M2007J20CG C:\Users\leont\Desktop\scrcpy-win64-v2.1.1\scrcpy-server: ...file pushed, 0 skipped. 193.2 MB/s (56995 bytes in 0.000s) (console pause here)

adb logcat also shows errors like "apex/com.android.media.swcodec/bin/mediaswcodec 'libbase.so' library not found"

rom1v commented 1 year ago

Oh, the server does not even manage to execute "list encoders". Something is wrong in the device ROM then.

LeonTheBigFat commented 1 year ago

Oh, the server does not even manage to execute "list encoders". Something is wrong in the device ROM then.

Yeah, I assumed it was a software issue when it wasn't even able to execute that. I'm trying to fix it, but I assume the only way around it is a clean install of the ROM because nothing related to video encoding or decoding is working

L1v3p commented 4 months ago

I have the same problem, does anyone know how to solve it?