games-on-whales / wolf

Stream virtual desktops and games running in Docker
https://games-on-whales.github.io/wolf/stable/
MIT License
292 stars 20 forks source link

Corrupted stream with Intel iGPU #50

Closed tostc closed 4 months ago

tostc commented 9 months ago

Hi,

I'm in the process of setting up a small retro game server and came across the "gow" project. Then I came across this project. But unfortunately the output of the emulation station “Server” is corrupted.

Some specs of my server

Wolf Log:

[2023-10-05 14:57:30] 

[2023-10-05 14:57:30] [ /etc/cont-init.d/10-setup_user.sh: executing... ]

[2023-10-05 14:57:30] **** Configure default user ****

[2023-10-05 14:57:30] Container running as root. Nothing to do.

[2023-10-05 14:57:30] DONE

[2023-10-05 14:57:30] 

[2023-10-05 14:57:30] [ /etc/cont-init.d/15-setup_devices.sh: executing... ]

[2023-10-05 14:57:30] **** Configure devices ****

[2023-10-05 14:57:30] Exec device groups

[2023-10-05 14:57:30] Adding user 'root' to groups: gow-gid-106,root

[2023-10-05 14:57:31] DONE

[2023-10-05 14:57:31] 

[2023-10-05 14:57:31] [ /etc/cont-init.d/30-nvidia.sh: executing... ]

[2023-10-05 14:57:31] 

[2023-10-05 14:57:31] 

[2023-10-05 14:57:31] [ /etc/cont-init.d/init-gamescope.sh: executing... ]

[2023-10-05 14:57:31] **** Setting up Gamescope ****

[2023-10-05 14:57:31] Launching the container's startup script as user 'root'

libva info: VA-API version 1.17.0

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so

libva info: Found init function __vaDriverInit_1_17

libva info: va_openDriver() returns 0

0:00:00.302829809    83 0x5603ec78f9d0 WARN          adaptivedemux2 gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init: Failed to load libsoup library

0:00:00.303631545    83 0x5603ec78f9d0 WARN          adaptivedemux2 gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init: Failed to load libsoup library

0:00:00.304971545    83 0x5603ec78f9d0 WARN          adaptivedemux2 gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init: Failed to load libsoup library

0:00:00.373203948    83 0x5603ec78f9d0 WARN                 default ges-meta-container.c:236:_set_value:<GESAsset@0x5603ec6b5d60> Could not set value on item: format-version

0:00:00.373319656    83 0x5603ec78f9d0 WARN                 default ges-meta-container.c:236:_set_value:<GESAsset@0x5603ec7c1d20> Could not set value on item: format-version

0:00:00.373375787    83 0x5603ec78f9d0 WARN                 default ges-meta-container.c:236:_set_value:<GESAsset@0x5603ec7c24d0> Could not set value on item: format-version

0:00:00.375318331    83 0x5603ec78f9d0 WARN               structure gststructure.c:2334:priv_gst_structure_parse_fields: Failed to find delimiter, r=mimetype

0:00:00.514929339    83 0x5603ec78f9d0 WARN                 default gstvaapi.c:231:plugin_init: Cannot create a VA display

0:00:00.518486509    83 0x5603ec78f9d0 WARN      GST_PLUGIN_LOADING gstplugin.c:534:gst_plugin_register_func: plugin "/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/validate/libgstvalidatessim.so" failed to initialise

0:00:00.625562292    83 0x5603ec78f9d0 WARN              cudaloader gstcudaloader.c:169:gst_cuda_load_library: Could not open library libcuda.so.1, libcuda.so.1: cannot open shared object file: No such file or directory

0:00:00.625613598    83 0x5603ec78f9d0 WARN                 nvcodec plugin.c:93:plugin_init: Failed to load cuda library

0:00:00.830298712    83 0x5603ec78f9d0 WARN      GST_PLUGIN_LOADING gstplugin.c:534:gst_plugin_register_func: plugin "/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/validate/libgstvalidatessim.so" failed to initialise

14:57:32.088505639 INFO  | Gstreamer version: 1.22.0-0

14:57:32.093558093 INFO  | Reading config file from: /wolf/cfg/config.toml

0:00:00.930457280     1 0x563b07b65920 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:712:gst_element_factory_make_with_properties: no such element factory "nvh264enc"!

libva info: VA-API version 1.17.0

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so

libva info: Found init function __vaDriverInit_1_17

libva info: va_openDriver() returns 0

14:57:32.207282496 INFO  | Selected H264 encoder: qsv

0:00:01.005504260     1 0x563b07b65920 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:712:gst_element_factory_make_with_properties: no such element factory "nvh265enc"!

14:57:32.207535474 INFO  | Selected HEVC encoder: qsv

14:57:32.210521645 INFO  | RTSP server started on port: 48010

14:57:32.210597091 INFO  | HTTP server listening on port: 47989 

14:57:32.210932412 WARN  | [PULSE] Unable to connect, Access denied

14:57:32.211077857 INFO  | Starting PulseAudio docker container

14:57:32.211313625 INFO  | RTP server started on port: 48000

14:57:32.211321237 INFO  | RTP server started on port: 47998

14:57:32.211784691 INFO  | Control server started on port: 47999

14:57:32.213460119 INFO  | HTTPS server listening on port: 47984 

14:58:06.399474336 INFO  | Starting container: /WolfES-DE_2422947761925974632

0:00:36.470339327     1 0x7f86ec001050 WARN            audioencoder gstaudioencoder.c:1014:gst_audio_encoder_finish_frame:<opusenc0> Can't copy metadata because input buffer disappeared

0:02:09.872976069     1 0x7f86c4002470 WARN                audiosrc gstaudiosrc.c:227:audioringbuffer_thread_func:<pulsesrc0> error reading data -1 (reason: Success), skipping segment

14:59:49.648466542 INFO  | Stopped container: /WolfES-DE_2422947761925974632

Emulationstation Container

[2023-10-05 15:11:21] 

[2023-10-05 15:11:21] [ /etc/cont-init.d/10-setup_user.sh: executing... ]

[2023-10-05 15:11:21] **** Configure default user ****

[2023-10-05 15:11:21] Setting default user uid=1000(retro) gid=1000(retro)

[2023-10-05 15:11:21] Setting umask to 000

[2023-10-05 15:11:21] Ensure retro home directory is writable

[2023-10-05 15:11:21] Ensure XDG_RUNTIME_DIR is writable

[2023-10-05 15:11:21] DONE

[2023-10-05 15:11:21] 

[2023-10-05 15:11:21] [ /etc/cont-init.d/15-setup_devices.sh: executing... ]

[2023-10-05 15:11:21] **** Configure devices ****

[2023-10-05 15:11:21] Exec device groups

[2023-10-05 15:11:22] Adding user 'retro' to groups: gow-gid-109,gow-gid-106,video

[2023-10-05 15:11:22] DONE

[2023-10-05 15:11:22] 

[2023-10-05 15:11:22] [ /etc/cont-init.d/30-nvidia.sh: executing... ]

[2023-10-05 15:11:22] 

[2023-10-05 15:11:22] 

[2023-10-05 15:11:22] [ /etc/cont-init.d/init-gamescope.sh: executing... ]

[2023-10-05 15:11:22] **** Setting up Gamescope ****

[2023-10-05 15:11:22] 

[2023-10-05 15:11:22] [ /etc/cont-init.d/setup-de.sh: executing... ]

[2023-10-05 15:11:22] Starting Application preparation

[2023-10-05 15:11:22] Copying custom config - retroarch.cfg, if not edited

[2023-10-05 15:11:22] Copying custom config - ES-DE Custom Scripts Platform, if not edited

[2023-10-05 15:11:22] Copying custom gamelist - ES-DE Custom Scripts Platform, if not edited

[2023-10-05 15:11:22] Copying custom config - RPCS3 Controller Bindings for Wolf and disable Auto-Update pop-up, if not edited

[2023-10-05 15:11:22] Copying custom config - PCSX2 settings, if not edited

[2023-10-05 15:11:22] Copying custom config - XEMU settings, if not edited

[2023-10-05 15:11:22] Copying hdd for XEMU if it is present in bioses or newer

[2023-10-05 15:11:22] Copying keys for YUZU if it is present in bioses or newer

[2023-10-05 15:11:22] Copying custom config - YUZU QT settings, if not edited

[2023-10-05 15:11:22] Copying default config - EmulationStation settings, if not edited

[2023-10-05 15:11:22] Change media directory for EmulationStation to /media

[2023-10-05 15:11:22] Change ROMs directory for EmulationStation to /ROMs

[2023-10-05 15:11:22] Copying custom launch scripts for emulators and programs, if not edited

[2023-10-05 15:11:22] Checking RA Assets presence, if none - install them

[2023-10-05 15:11:22] Symlinking AppImage Emulators from /Applications

[2023-10-05 15:11:22] Symlinking Bioses from /Bioses

[2023-10-05 15:11:22] Launching the container's startup script as user 'retro'

[2023-10-05 15:11:22] Launching EmulationStation-Desktop Edition

No CAP_SYS_NICE, falling back to regular-priority compute and threads.

Performance will be affected.

wlserver: [backend/headless/backend.c:68] Creating headless backend

Couldn't open plugin directory: No such file or directory

No plugins found, falling back on no decorations

vulkan: selecting physical device 'Intel(R) HD Graphics 530 (SKL GT2)': queue family 0

vulkan: physical device supports DRM format modifiers

vulkan: supported DRM formats for sampling usage:

vulkan:   AR24 (0x34325241)

vulkan:   XR24 (0x34325258)

vulkan:   AB24 (0x34324241)

vulkan:   XB24 (0x34324258)

vulkan:   NV12 (0x3231564E)

vulkan:   AB4H (0x48344241)

vulkan:   XB4H (0x48344258)

vulkan:   AB48 (0x38344241)

vulkan:   XB48 (0x38344258)

vulkan:   AB30 (0x30334241)

vulkan:   XB30 (0x30334258)

vulkan:   AR30 (0x30335241)

vulkan:   XR30 (0x30335258)

wlserver: Running compositor on wayland display 'gamescope-0'

wlserver: [backend/headless/backend.c:16] Starting headless backend

wlserver: [xwayland/sockets.c:118] Created /tmp/.X11-unix ourselves -- other users will be unable to create X11 UNIX sockets of their own

wlserver: [xwayland/server.c:108] Starting Xwayland on :0

wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x5581a5cf2780 (res 0x5581a5c1f330)

wlserver: [xwayland/server.c:273] Xserver is ready

[W][04629.649822] pw.conf      | [          conf.c:  939 try_load_conf()] can't load config client.conf: No such file or directory

[E][04629.650013] pw.conf      | [          conf.c:  963 pw_conf_load_conf_for_context()] can't load default config client.conf: No such file or directory

pipewire: pw_context_new failed

Warning: failed to setup PipeWire, screen capture won't be available

xwm: Failed to load host cursor. Falling back to left_ptr.

WARNING: Kernel has no file descriptor comparison support: Operation not permitted

wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x5581a5d9f560 (res 0x5581a5c22580)

The XKEYBOARD keymap compiler (xkbcomp) reports:

> Warning:          Unsupported maximum keycode 708, clipping.

>                   X11 cannot support keycodes above 255.

Errors from xkbcomp are not fatal to the X server

ALSA lib confmisc.c:855:(parse_card) cannot find card '0'

ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory

ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings

ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory

ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name

ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default

Oct 05 15:11:26 Error:  Unable to open audio device: ALSA: Couldn't open audio device: No such file or directory

Moonlight Stream:

Glitch

I should mention that the Firefox container, for example, works fine.

ABeltramo commented 9 months ago

This is a known issue with Gamescope and Intel iGPU specifically: https://github.com/ValveSoftware/gamescope/issues/356

There seems to be two possible solutions to this at the moment:

We should probably add one of those variables by default when detecting an Intel GPU.

tostc commented 9 months ago

Thanks for the quick response. The env variable INTEL_DEBUG=norbc worked for me, the other one causes the container to be stopped. Should I close this issue or should I leave it open for proper Intel GPU detection feature?

ABeltramo commented 9 months ago

Let's leave it open so that I'll remember to add this workaround to Wolf!