games-on-whales / gow

A collection of Dockerized games and apps like Steam, Firefox and Retroarch
https://games-on-whales.github.io/gow/
MIT License
439 stars 67 forks source link

[Wolf - Steam] Could not open connection to X #197

Closed ClementVincent closed 2 hours ago

ClementVincent commented 5 hours ago

Hello everyone,

I'm trying to use Wolf to stream a Steam docker (ghcr.io/games-on-whales/steam:edge) but the container crashes at startup with the following error:

src/steamexe/updateui_xwin.cpp (339) : Could not open connection to X
src/steamexe/main.cpp (1223) : failed to initialize update status ui, or create initial window

I deep dived a bit in the documentation as well as in the GOW Steam docker startup script but I still cannot figure it out. Looking at the error, I suppose it's related to Wayland the fact that, since I'm using sunshine, I do not have a physical display attached to the docker but rather a pipeline).

I'll be glad if anyone has any idea :)

Here's the relevant logs :

DEBUG | Host app state folder: /mnt/user/appdata/wolf/7875106462968103757, Steam, creating paths
DEBUG | [STREAM_SESSION] Create wayland compositor
DEBUG | [WAYLAND] Creating wayland display
DEBUG | [STREAM_SESSION] Create virtual audio sink
DEBUG | [GSTREAMER] Starting video producer: appsrc is-live=true name=wolf_wayland_source ! queue ! interpipesink name=7875106462968103757_video sync=true async=false max-bytes=0 max-buffers=3
DEBUG | [GSTREAMER] Starting audio producer: pulsesrc device=\"virtual_sink_7875106462968103757.monitor\" server=\"/tmp/sockets/pulse-socket\" ! audio/x-raw, channels=2, rate=48000 ! queue ! interpipesink name=\"7875106462968103757_audio\" sync=true async=false max-bytes=0 ma>
DEBUG | WAYLAND_DISPLAY=/tmp/sockets/wayland-1
INFO  | RTP server started on port: 48100
INFO  | RTP server started on port: 48200
DEBUG | Setting up wolf_wayland_source
DEBUG | [PULSE] Created virtual sink: 6
DEBUG | [WAYLAND] Start feeding app-src
DEBUG | /dev/dri/renderD128 vendor: NVIDIA Corporation
DEBUG | [DOCKER] Using fake-udev, creating /mnt/user/appdata/wolf/7875106462968103757/Steam/udev/data
DEBUG | /dev/dri/renderD128 vendor: NVIDIA Corporation
INFO  | NVIDIA_DRIVER_VOLUME_NAME not set, assuming nvidia driver toolkit is installed.
DEBUG | [RTSP] received command OPTIONS
DEBUG | [RTSP] received command DESCRIBE
DEBUG | [RTSP] received command SETUP
DEBUG | [RTSP] received command SETUP
DEBUG | [RTSP] received command SETUP
DEBUG | [RTSP] received command ANNOUNCE
DEBUG | [RTSP] Moonlight requested video format HEVC
DEBUG | [RTSP] Adjusted video bitrate to 7308 Kbps
DEBUG | Video session 7875106462968103757, waiting for PING...
DEBUG | Audio session 7875106462968103757, waiting for PING...
DEBUG | [RTSP] received command PLAY
DEBUG | [ENET] connected client: 192.168.1.87:40133
DEBUG | Starting video pipeline: 
  interpipesrc listen-to=7875106462968103757_video is-live=true stream-sync=restart-ts max-bytes=0 max-buffers=3 block=false !
  queue !
  cudaupload !
  cudaconvertscale !
  video/x-raw(memory:CUDAMemory), width=1280, height=720, chroma-site=mpeg2, format=NV12, colorimetry=bt601, pixel-aspect-ratio=1/1 !
  nvh265enc gop-size=-1 bitrate=7308 aud=false rc-mode=cbr zerolatency=true preset=p1 tune=ultra-low-latency multi-pass=two pass-quarter !
  h265parse !
  video/x-h265, profile=main, stream-format=byte-stream !
  rtpmoonlightpay_video name=moonlight_pay payload_size=1392 fec_percentage=20 min_required_fec_packets=2 !
  udpsink bind-port=48100 host=192.168.1.87 port=50589 sync=true
WARN   cudaconvertscale gstcudaconvertscale.c:1396:gst_cuda_base_convert_set_info:<cudaconvertscale5> Can't calculate borders
WARN   cudaconverter gstcudaconverter.c:2104:gst_cuda_converter_setup:<cudaconverter3> Couldn't compile to cubin, trying ptx
WARN   basesrc gstbasesrc.c:4255:gst_base_src_push_segment:<interpipesrc6> segment format mismatched, ignore
DEBUG | Starting audio pipeline:
  interpipesrc listen-to=7875106462968103757_audio is-live=true stream-sync=restart-ts max-bytes=0 max-buffers=3 block=false !
  queue max-size-buffers=3 leaky=downstream ! audiorate ! audioconvert !
  opusenc bitrate=96000 bitrate-type=cbr frame-size=5 bandwidth=fullband audio-type=restricted-lowdelay max-payload-size=1400 !
  rtpmoonlightpay_audio name=moonlight_pay packet_duration=5 encrypt=true aes_key=\"23defb5b0a9138676ec2cded6c2f67ae\" aes_iv=\"1032705766\" !
  udpsink bind-port=48200 host=192.168.1.87 port=50587 sync=true
INFO  | Creating Xbox joypad for controller 0
DEBUG | [INPUT] Sending PlugDeviceEvent for joypad 0 of type: 0
DEBUG | 7875106462968103757 received hot-plug device event
DEBUG | [GSTREAMER] Forcing IDR
WARN   \u001b[00m \u001b[00m  basesrc gstbasesrc.c:4255:gst_base_src_push_segment:<cinterpipesrc7> segment format mismatched, ignore
DEBUG | RTP server on port: 48100 stopped
DEBUG | RTP server on port: 48200 stopped
NFO  | [DOCKER] Starting container: /WolfSteam_7875106462968103757
DEBUG | [DOCKER] Starting container:
  id: 3a969a3512282da74fabefde2d79a195da0a2e8db735dad2507471ef4c747dc2
  name: /WolfSteam_7875106462968103757
  image: ghcr.io/games-on-whales/steam:edge
  status: 0
  ports: []
  mounts: [/tmp/sockets/pulse-socket:/tmp/sockets/pulse-socket:rw, /tmp/sockets/wayland-1:/tmp/sockets/wayland-1:rw, /mnt/user/appdata/wolf/7875106462968103757/Steam:/home/retro:rw, /mnt/user/appdata/wolf/7875106462968103757/Steam/udev:/run/udev/:rw, /mnt/user/appdata/wolf//fake-udev:/usr/bin/fake-udev:ro]\>
  devices: [/dev/dri/card0:/dev/dri/card0:mrw, /dev/dri/renderD128:/dev/dri/renderD128:mrw, /dev/dri/card0:/dev/dri/card0:mrw, /dev/nvidia0:/dev/nvidia0:mrw, /dev/nvidia-modeset:/dev/nvidia-modeset:mrw, /dev/nvidia-uvm:/dev/nvidia-uvm:mrw, /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools:mrw, /dev/nvidiactl:/dev>
  env: [\"PROTON_LOG=1\", \"RUN_SWAY=true\", \"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*\", \"PULSE_SOURCE=virtual_sink_7875106462968103757.monitor\", \"GAMESCOPE_REFRESH=60\", \"PUID=1000\", \"PULSE_SINK=virtual_sink_7875106462968103757\", \"WAYLAND_DISPLAY=wayland-1\", \"GAMESCOPE_HEIGHT=720 "PGID=1000", "PULSE_SERVER=/tmp/sockets/pulse-socket", "XDG_RUNTIME_DIR=/tmp/sockets", "GAMESCOPE_WIDTH=1280", "NVIDIA_VISIBLE_DEVICES=all", "NVIDIA_DRIVER_CAPABILITIES=all", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "UMASK=000", "UNAME=retro", "HOME=/home/retro", "TZ=Europe/London", "DEBIAN_FRONTEND=noninteractive", "NEEDRESTART_SUSPEND=1", "GAMESCOPE_VERSION=3.12.5", "BUILD_ARCHITECTURE=amd64", "DEB_BUILD_OPTIONS=noddebs"]
:
DEBUG | [DOCKER] Writing hwdb file: /mnt/user/appdata/wolf/7875106462968103757/Steam/udev/data/c13:65
DEBUG | [DOCKER] Executing command: mkdir -p /dev/input \u0026\u0026 mknod /dev/input/event1 c 13 65 \u0026\u0026 chmod 777 /dev/input/event1 \u0026\u0026 fake-udev -m LklOUFVUX0NMQVNTPWpveXN0aWNrAEFDVElPTj1hZGQAQ1VSUkVOVF9UQUdTPTpzZWF0OnVhY2Nlc3M6AERFVk5BTUU9L2Rldi9pbnB1dC9l>
DEBUG | [DOCKER] Executing command: mkdir -p /dev/input \u0026\u0026 mknod /dev/input/js0 c 13 0 \u0026\u0026 chmod 777 /dev/input/js0 \u0026\u0026 fake-udev -m LklOUFVUX0NMQVNTPWpveXN0aWNrAEFDVElPTj1hZGQAQ1VSUkVOVF9UQUdTPTpzZWF0OnVhY2Nlc3M6AERFVk5BTUU9L2Rldi9pbnB1dC9qczAAREV>
DEBUG | [DOCKER] Container logs: 
  [ /etc/cont-init.d/10-setup_user.sh: executing... ]
  **** Configure default user ****
  Setting default user uid=1000(retro) gid=1000(retro)
  userdel: ubuntu mail spool (/var/mail/ubuntu) not found
  Auseradd: warning: the home directory /home/retro already exists.
  useradd: Not copying any file from skel directory into it.
  Setting umask to 000
 Ensure retro home directory is writable
  Ensure XDG_RUNTIME_DIR is writable
  DONE
  [ /etc/cont-init.d/15-setup_devices.sh: executing... ]
   **** Configure devices ****
  Exec device groups
  Adding user 'retro' to groups: gow-gid-18,root
  DONE
  [ /etc/cont-init.d/30-nvidia.sh: executing... ]
  [ /etc/cont-init.d/init-gamescope.sh: executing... ]
  **** Setting up Gamescope ****
  [ /etc/cont-init.d/system-services.sh: executing... ]"}
  *** DBus started ***
  *** Bluez started ***
  bluetoothd[141]: Bluetooth daemon 5.72
  bluetoothd[141]: src/adapter.c:adapter_init() Failed to access management interface
  bluetoothd[141]: src/main.c:main() Adapter handling initialization failed
  NetworkManager started ***\n
  Launching the container's startup script as user 'retro'
  Starting Steam with DISPLAY=
  steam.sh[1]: Running Steam on ubuntu 24.04 64-bit
  steam.sh[1]: STEAM_RUNTIME is enabled automatically
  {setup.sh[240]: Steam runtime environment up-to-date!
  /home/retro/.steam/debian-installation/ubuntu12_32/steam-runtime/run.sh: line 85: steam-runtime-identify-library-abi: command not found
  run.sh[256]: steam-runtime-identify-library-abi --ldconfig-paths failed, falling back to ldconfig
  steam.sh[1]: Can't find 'steam-runtime-check-requirements', continuing anyway
  Init: Installing breakpad exception handler for appid(steam)/version(0)/tid(297)
  src/steamexe/updateui_xwin.cpp (339) : Could not open connection to X
  tid(297) burning pthread_key_t == 0 so we never use it
  WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
  Startup - updater built Jan 13 2024 00:51:43
  Startup - Steam Client launched with: '/home/retro/.steam/debian-installation/ubuntu12_32/steam' '-nominidumps' '-nobreakpad' '-bigpicture'\n","stream":"stderr","time":"2024-11-17T14:13:43.397168675Z"}
  QILocalize::AddFile() failed to load file \"public/steambootstrapper_english.txt\"
  Init: Installing breakpad exception handler for appid(steam)/version(1.0)/tid(297)
  Bassert_20241117141342_4.dmp[302]: Uploading dump (out-of-process)
  /tmp/dumps/assert_20241117141342_4.dmp
  _src/steamexe/main.cpp (1223) : failed to initialize update status ui, or create initial window
  src/steamexe/updateui_xwin.cpp (339) : Could not open connection to X
  _src/steamexe/main.cpp (1223) : failed to initialize update status ui, or create initial window

Additionnal information Host OS : Unraid 7.0.0-beta4 (based Slackware 15.0 x86_64 (post 15.0 -current))

ABeltramo commented 4 hours ago

Do you have a locally cached old ghcr.io/games-on-whales/steam:edge image by any chance? Maybe you tried Wolf in the past?
I'd suggest trying to update to the latest by simply pulling:

docker pull ghcr.io/games-on-whales/steam:edge

and try again to start Steam via Moonlight.

ClementVincent commented 2 hours ago

Thank you, it solved this issue. However, the container is still crashing for an other reason (looks like Sway cannot work with proprieraty drivers) . I'll investigate on my side and open another issue if needed.

Closing this one 👍

ABeltramo commented 2 hours ago

However, the container is still crashing for an other reason (looks like Sway cannot work with proprieraty drivers)

Sway definitely works with the Nvidia GPU using the proprietary drivers, feel free to post the logs or to open up a new issue!