moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.5k stars 326 forks source link

"Error: failed to open X display" on OrangePi #856

Open workaccount23 opened 2 years ago

workaccount23 commented 2 years ago

_NVidia Geforce Experience version: 3.25.1.27 Moonlight Embedded source: compiled from source, after installing dependencies manually Moonlight Embedded running on: OrangePi Zero 2 Moonlight Embedded running on distribution: OrangePi 3.0 bullseye

Verbose output -verbose of Moonlight Embedded:

root@orangepizero2:~# moonlight stream 192.168.8.139 -verbose Moonlight Embedded 2.5.2 (X11;VDPAU;ALSA;PULSE;EMBEDDED) Connect to 192.168.8.139... GPU: NVIDIA GeForce RTX 2070, GFE: 3.25.1.27 (gs_04_37_31106651, 7.1.437.0) Platform X Window System (software decoding) Loading mappingfile /usr/local/share//moonlight/gamecontrollerdb.txt Not mapping sunxi-ir as a gamepad Stream 1280 x 720, 60 fps, 10000 kbps RTSP port: 48010 Initializing platform...done Resolving host name...done Initializing audio stream...done Starting RTSP handshake...Audio port: 48000 Video port: 47998 Control port: 47999 done Initializing control stream...done Initializing video stream...done Initializing input stream...done Starting control stream...done Error: failed to open X display. Starting video stream...Video stream start failed: -1 Stopping control stream...ENet peer acknowledged disconnection done Cleaning up input stream...done Cleaning up video stream...done Cleaning up control stream...done Cleaning up audio stream...done Cleaning up platform...done

What is the expected result? I would expect the streaming to start

What happens instead of that? Steam Big Picture opens on PC, but the stream doesnt start.

If I use the -app options the desired game starts properly on PC, but the same error arises. Is this error due to the OrangePi or is it something I could have messed up?

cgutman commented 2 years ago

It looks like you're trying to run moonlight-embedded from a session that doesn't have X running. Additionally, it looks like Moonlight Embedded is trying to use software decoding, which is unlikely to give you acceptable performance on that hardware even if it did work.

I'd suggest checking what libraries and/or patches are required to support hardware accelerated video decoding on the Orange Pi Zero 2. Decoding code on most embedded Linux devices tends to be very vendor-specific, because everyone invented their own standards and libraries. That situation is getting better with V4L2, but it's not widely supported yet.

If you can find a new enough version of FFmpeg that can do hardware accelerated decoding, you might have more success using Moonlight Qt which uses FFmpeg for hardware decoding.