Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.6k stars 10.53k forks source link

Could not initialize SDL - No available video device #2673

Open xxxxxxH opened 3 years ago

xxxxxxH commented 3 years ago

Environment ubuntu 20.04 scrcpy 1.19 RedMi k20 Android 10 INFO: scrcpy 1.19 https://github.com/Genymobile/scrcpy /usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 44.5 MB/s (37330 bytes in 0.001s) error: XDG_RUNTIME_DIR not set in the environment. CRITICAL: Could not initialize SDL: No available video device [server] INFO: Device: Xiaomi Redmi K20 (Android 10) [server] ERROR: Exception on thread Thread[main,5,main] java.io.IOException: Connection refused at android.net.LocalSocketImpl.connectLocal(Native Method) at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:296) at android.net.LocalSocket.connect(LocalSocket.java:147) at com.genymobile.scrcpy.DesktopConnection.connect(DesktopConnection.java:40) at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:63) at com.genymobile.scrcpy.Server.scrcpy(Server.java:57) at com.genymobile.scrcpy.Server.main(Server.java:255) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380)

rom1v commented 3 years ago
error: XDG_RUNTIME_DIR not set in the environment.
CRITICAL: Could not initialize SDL: No available video device

Do you just run scrcpy locally, or over SSH or in a VM or something?

xxxxxxH commented 3 years ago

run in VM

xxxxxxH commented 3 years ago

subsystm for windows 10 ubuntu 20.04 LTS

xxxxxxH commented 2 years ago

hello hello Is there any solution

rom1v commented 2 years ago

Your VM seems to not have access to accelerated video output.

xxxxxxH commented 2 years ago

So what should I do ths

liukuo362573 commented 1 year ago

I meet the same question in 阿里云 arm64 Ubuntu VM , has anybody resolve this?

liukuo362573 commented 1 year ago

I meet the same question in 阿里云 arm64 Ubuntu VM , has anybody resolve this?

Finally, I change to other ROM version,the error disappear.

pongpom commented 1 year ago

I meet the same question in 阿里云 arm64 Ubuntu VM , has anybody resolve this?

Finally, I change to other ROM version,the error disappear.

what kind of ROM version did you running successfully? i'm using azure Ubuntu 22 VM with arm64 and face the same error now....

liukuo362573 commented 1 year ago

@pongpom other redroid version

donkeykangwang10 commented 2 weeks ago

@pongpom other redroid version

Coud I know which redroid version? I came across the same issue.