Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No screen popping up in Fedora #2554

Closed
2 tasks done
sourcecodere opened this issue Aug 11, 2021 · 6 comments
Closed
2 tasks done

No screen popping up in Fedora #2554

sourcecodere opened this issue Aug 11, 2021 · 6 comments

Comments

@sourcecodere
Copy link

sourcecodere commented Aug 11, 2021

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Fedora 34 (wayland and intel GPU)
  • scrcpy version: 1.18
  • installation method: dnf (also tried manual way)
  • device model: Samsung S10
  • Android version: 10

Describe the bug
No screen is displayed. Stuck here:

$ scrcpy 
INFO: scrcpy 1.18 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed. 6.9 MB/s (37330 bytes in 0.005s)
[server] INFO: Device: samsung SM-G973F (Android 10)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 21.1.6
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2280

Running with -Vdebug it is stuck on [server] DEBUG: Using encoder: 'OMX.Exynos.AVC.Encoder'.

No obvious error message in adb logcat and nothing in sudo journalctl -f.

I have tried:

  • Different resolutions with -m
  • All the different codecs
  • A different phone
  • adb shell screenrecord .... works

Not sure where to look/debug :-(

@rom1v
Copy link
Collaborator

rom1v commented Aug 12, 2021

OS: Fedora 34 (wayland and intel GPU)

Does it work better with:

export SDL_VIDEODRIVER=wayland
scrcpy

?

If not, could you build the client manually (following the BUILD instructions, but in debug mode):

meson d --prebuilt-server=/usr/share/scrcpy/scrcpy-server
ninja -Cd

Then run it under gdb:

export SCRCPY_SERVER_PATH=/usr/share/scrcpy/scrcpy-server
gdb d/app/scrcpy
# in gdb: run

When stuck, Ctrl+C or Ctrl+z, and in gdb, execute:

thread apply all bt

Then post the backtraces.

Thank you

@sourcecodere
Copy link
Author

export SDL_VIDEODRIVER=wayland

Fixed it! Thank you very much!

@sourcecodere
Copy link
Author

So in case anyone else struggles on Fedora with wayland:

sudo dnf install libdecor
SDL_VIDEODRIVER=wayland scrcpy

Thanks again @rom1v

rom1v added a commit that referenced this issue Aug 13, 2021
The video driver might need to be explicitly set to wayland.

Refs #2554 <#2554>
Refs #2559 <#2559>
rom1v added a commit that referenced this issue Aug 13, 2021
The video driver might need to be explicitly set to wayland.

Refs #2554 <#2554>
Refs #2559 <#2559>
@allco
Copy link

allco commented Apr 28, 2022

I have this on fedora 36:

➜  ~ sudo dnf install libdecor                            
Last metadata expiration check: 0:06:26 ago on Thu 28 Apr 2022 09:35:35 AM CEST.
Package libdecor-0.1.0-2.fc36.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

➜  ~ SDL_VIDEODRIVER=wayland scrcpy --verbosity=debug
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:     -->   (usb)  FA79T1A03801                    device  Pixel_2
DEBUG: Device serial: FA79T1A03801
DEBUG: Using server: /usr/share/scrcpy/scrcpy-server
/usr/share/scrcpy/scrcpy-server: 1 fil...ed. 562.4 MB/s (41123 bytes in 0.000s)
[server] INFO: Device: Google Pixel 2 (Android 11)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 22.0.1
INFO: Trilinear filtering enabled
DEBUG: Using icon: /usr/share/icons/hicolor/256x256/apps/scrcpy.png
INFO: Initial texture: 1080x1920
DEBUG: Starting demuxer thread
ERROR: Could not open codec
ERROR: Could not open packet sink 0
ERROR: Could not open demuxer sinks
WARN: Device disconnected
DEBUG: quit...
DEBUG: Receiver stopped
[server] DEBUG: Controller stopped
[server] DEBUG: Using encoder: 'OMX.qcom.video.encoder.avc'
WARN: Killing the server...
DEBUG: Server disconnected
DEBUG: Server terminated
➜  ~ 

Created a separate issue here: #3223

@winkelnp
Copy link

I'm still having the issue mentioned in the original post here despite having added export SDL_VIDEODRIVER=wayland to my shell config. Is there anything else I can do?

I'm on fedora 36, installed through copr zeno/scrcpy, libdecor is installed.

@rom1v
Copy link
Collaborator

rom1v commented Sep 23, 2022

See #3431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants