Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.39k stars 10.44k forks source link

Window doesn't display #3561

Open trotinet65 opened 1 year ago

trotinet65 commented 1 year ago

Environment

Hello,

I've a problem with my desktop computer and my devices. All work correctly on my laptop.

I think scrcpy works correctly but nothing displays any window :

scrcpy -V verbose 
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:     -->   (usb)  RF8R9084GWB                     device  SM_G780G
DEBUG: Device serial: RF8R9084GWB
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
/usr/local/share/scrcpy/scrcpy-server:...shed. 1.3 MB/s (41159 bytes in 0.031s)
[server] INFO: Device: samsung SM-G780G (Android 12)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
[server] DEBUG: Using encoder: 'OMX.qcom.video.encoder.avc'
INFO: Renderer: opengles2
INFO: OpenGL version: OpenGL ES 3.2 NVIDIA 510.85.02
INFO: Trilinear filtering enabled
DEBUG: Using icon: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
INFO: Initial texture: 1080x2400
DEBUG: Starting demuxer thread
adb version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5ubuntu2
Installed as /usr/lib/android-sdk/platform-tools/adb

I can record with :

scrcpy -r blabla.mkv

My problem is there, when I lauch this command, nothing happens

scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
adb server version (41) doesn't match this client (39); killing...
daemon started successfully
/usr/local/share/scrcpy/scrcpy-server:...shed. 5.3 MB/s (41159 bytes in 0.007s)
[server] INFO: Device: samsung SM-G780G (Android 12)
INFO: Renderer: opengles2
INFO: OpenGL version: OpenGL ES 3.2 NVIDIA 510.85.02
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400

Can you help me please ?

Thanks a lot

rom1v commented 1 year ago

Do you use Wayland with SDL 2.0.24? If so, see https://github.com/Genymobile/scrcpy/issues/3431

(scrcpy -v to get the version of all libraries)

adb server version (41) doesn't match this client (39); killing...

This is not related to your window not opening, but: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#conflicts-between-adb-versions

trotinet65 commented 1 year ago

I'm not use Wayland.

I think adb is running because scrcpy -r blabla.mkv works.

scrcpy -v
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>

Dependencies (compiled / linked):
 - SDL: 2.25.0 / 2.25.0
 - libavcodec: 58.54.100 / 58.134.100
 - libavformat: 58.29.100 / 58.76.100
 - libavutil: 56.31.100 / 56.70.100
 - libavdevice: 58.8.100 / 58.13.100
 - libusb: - / 1.0.25
rom1v commented 1 year ago

INFO: Renderer: opengles2

I'm surprised that it uses opengles2 rather than opengl.

Could you try with another render driver:

scrcpy --render-driver opengl
trotinet65 commented 1 year ago

Nothing else. That's not working.

scrcpy --render-driver opengl
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server:...shed. 1.3 MB/s (41159 bytes in 0.029s)
[server] INFO: Device: samsung SM-G780G (Android 12)
INFO: Renderer: opengles2
INFO: OpenGL version: OpenGL ES 3.2 NVIDIA 510.85.02
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
rom1v commented 1 year ago

There is probably an issue with your drivers then :/ I don't know what else could explain this.

trotinet65 commented 1 year ago

I've tied to remove *nvidia and try "nouveau" but result is the same

trotinet65 commented 1 year ago

I think I've found the problem. I had installed by a script. I think I've made a bad uninstall. Now, I've installed it with apt-get install but it not found it in /usr/local/bin/scrcpy. Environnement path seems to be wrong. How can clean all that please ?

trotinet65 commented 1 year ago

Resolve after a fresh install. Thanks all

markx86 commented 1 year ago

I ran into the same problem (Fedora 36, GNOME 42, NVIDIA GTX 1070 driver version 520.56.06). I managed to fix it by running scrcpy under XWayland. This can be achieved by setting the SDL_VIDEODRIVER environment variable to x11. So the new launch command becomes:

env SDL_VIDEODRIVER=x11 scrcpy <arguments here>
djwesty commented 1 year ago

I had this issue on a new Ubuntu 22.04 with scrcpy

Turns out scrcpy was just running (apparently) with a size of 0x0 pixels, which made it effectively invisible. When the app was running, I clicked on it in the dock to bring to focus, then 'Alt + enter' and 'resize'. Solved my issue after a lot of headache

rom1v commented 1 year ago

Turns out scrcpy was just running (apparently) with a size of 0x0 pixels

Weird. What are the logs in the console when you start scrcpy?

mikasius commented 1 year ago

I ran into the same problem (Fedora 36, GNOME 42, NVIDIA GTX 1070 driver version 520.56.06). I managed to fix it by running scrcpy under XWayland. This can be achieved by setting the SDL_VIDEODRIVER environment variable to x11. So the new launch command becomes:

env SDL_VIDEODRIVER=x11 scrcpy <arguments here>

Thank you! This helps me to solve this problem :)