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

Black screen when use umu-launcher #77

Closed rty813 closed 3 weeks ago

rty813 commented 3 weeks ago

umu-launcher is a Unified Linux Wine Game Launcher

I duplicated the image/steam directory from the gow project and modified the Dockerfile to install umu-launcher. Then, in startup.sh, I changed the startup command from steam to umu-run to run the game directly. However, after starting, I can only hear the sound while the screen remains black.

I compared the command lines of the running processes when starting through Steam and through umu, and the compatibility layer parts are identical. I specifically designated the compatibility layer from the Steam directory for umu to use. Therefore, I believe the issue is not with the compatibility layer.

startup.sh:

#!/bin/bash
set -e

source /opt/gow/bash-lib/utils.sh

gow_log "Starting Steam with DISPLAY=${DISPLAY}"

export GAMEID=umu-dauntless
export PROTONPATH="/home/retro/.steam/debian-installation/steamapps/common/Proton - Experimental"

if [ -n "$RUN_GAMESCOPE" ]; then
  GAMESCOPE_WIDTH=${GAMESCOPE_WIDTH:-1920}
  GAMESCOPE_HEIGHT=${GAMESCOPE_HEIGHT:-1080}
  GAMESCOPE_REFRESH=${GAMESCOPE_REFRESH:-60}
  GAMESCOPE_MODE=${GAMESCOPE_MODE:-"-b"}

  /usr/games/gamescope -e ${GAMESCOPE_MODE} -R $socket -T $stats -W "${GAMESCOPE_WIDTH}" -H "${GAMESCOPE_HEIGHT}" -r "${GAMESCOPE_REFRESH}" -- umu-run "${EXE_PATH}"  "-opengl -SkipBuildPatchPrereq"
else
  exec umu-run "${EXE_PATH}" "-opengl -SkipBuildPatchPrereq"
fi

Dockerfile:

......

RUN <<_INSTALL_UMU
set -e
apt-get update
apt install -y --no-install-recommends git  build-essential scdoc
git clone https://github.com/Open-Wine-Components/umu-launcher
cd umu-launcher
./configure.sh --prefix=/usr
make -j
make install
cd ..
rm -rf umu-launcher
_INSTALL_UMU
......

Here is the log of container:

[2024-06-06 13:34:01] 
[2024-06-06 13:34:01] [ /etc/cont-init.d/10-setup_user.sh: executing... ]
[2024-06-06 13:34:01] **** Configure default user ****
[2024-06-06 13:34:01] Setting default user uid=1000(retro) gid=1000(retro)
userdel: ubuntu mail spool (/var/mail/ubuntu) not found
useradd: warning: the home directory /home/retro already exists.
useradd: Not copying any file from skel directory into it.
[2024-06-06 13:34:01] Setting umask to 000
[2024-06-06 13:34:01] Ensure retro home directory is writable
[2024-06-06 13:34:01] Ensure XDG_RUNTIME_DIR is writable
[2024-06-06 13:34:01] DONE
[2024-06-06 13:34:01] 
[2024-06-06 13:34:01] [ /etc/cont-init.d/15-setup_devices.sh: executing... ]
[2024-06-06 13:34:01] **** Configure devices ****
[2024-06-06 13:34:01] Exec device groups
[2024-06-06 13:34:02] Adding user 'retro' to groups: video,root
[2024-06-06 13:34:02] DONE
[2024-06-06 13:34:02] 
[2024-06-06 13:34:02] [ /etc/cont-init.d/30-nvidia.sh: executing... ]
[2024-06-06 13:34:02] Nvidia driver detected
[2024-06-06 13:34:02] [nvidia] Add Vulkan ICD
[2024-06-06 13:34:02] [nvidia] Add EGL external platform
[2024-06-06 13:34:02] [nvidia] Add egl-vendor
[2024-06-06 13:34:02] [nvidia] Add gbm backend
[2024-06-06 13:34:02] 
[2024-06-06 13:34:02] 
[2024-06-06 13:34:02] [ /etc/cont-init.d/init-gamescope.sh: executing... ]
[2024-06-06 13:34:02] **** Setting up Gamescope ****
[2024-06-06 13:34:02] 
[2024-06-06 13:34:02] [ /etc/cont-init.d/system-services.sh: executing... ]
*** DBus started ***
*** Bluez started ***
bluetoothd[153]: Bluetooth daemon 5.72
bluetoothd[153]: src/adapter.c:adapter_init() Failed to access management interface
bluetoothd[153]: src/main.c:main() Adapter handling initialization failed
*** NetworkManager started ***
[2024-06-06 13:34:02] Launching the container's startup script as user 'retro'
[2024-06-06 13:34:02] Starting Steam with DISPLAY=
Claimed global gamescope stats session at "/tmp/sockets/gamescope-stats"
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: physical device 10de:2684 compute queue doesn't support presenting on our surface, using graphics queue
vulkan: selecting physical device 'NVIDIA GeForce RTX 4090': queue family 0
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
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:   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
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x557f58200560 (res 0x557f58683070)
wlserver: [xwayland/server.c:273] Xserver is ready
xwm: Failed to load host cursor. Falling back to left_ptr.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x557f5867c410 (res 0x557f58685a00)
[2024-06-06 13:34:02.836] [info] [config.cpp:123] parsing config: '/tmp/mangohud.eyD0inWO'
[2024-06-06 13:34:02.864] [error] [loader_nvctrl.cpp:39] Failed to open 64bit libXNVCtrl.so.0: libXNVCtrl.so.0: cannot open shared object file: No such file or directory
[2024-06-06 13:34:02.864] [error] [nvctrl.cpp:45] XNVCtrl loader failed to load
[2024-06-06 13:34:02.864] [info] [overlay.cpp:808] Uploading is disabled (permit_upload = 0)
xwm: Rejecting WM_CHANGE_STATE to ICONIC for window 0x400007
steamrt3 is up to date
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.550.90.07 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH "", ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
x86_64-linux-gnu-capsule-capture-libs: warning: we are assuming "_el_fn_sh_complete" to be private, but it's just a guess
i386-linux-gnu-capsule-capture-libs: warning: we are assuming "_el_fn_sh_complete" to be private, but it's just a guess
pressure-vessel-wrap[248]: N: Not replacing "/etc/vulkan/explicit_layer.d" with tmpfs: Path "/etc" is reserved by the container framework
pressure-vessel-wrap[248]: N: Not replacing "/etc/vulkan/implicit_layer.d" with tmpfs: Path "/etc" is reserved by the container framework
setlocale "en_US.UTF-8": No such file or directory
pressure-vessel-locale-gen: Missing locale en_US.UTF-8
pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
pressure-vessel-adverb[315]: W: Container startup will be faster if missing locales are created at OS level
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x557f58656ee0 (res 0x557f58686170)
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x557f58657240 (res 0x557f586864d0)
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x557f586a7af0 (res 0x557f58684b60)
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ

Docker top:

/bin/bash /opt/gow/startup-app.sh
dbus-daemon --system --fork --nosyslog
NetworkManager
/usr/games/gamescope -e -b -R /tmp/sockets/gamescope.NFjMUaQ/startup.socket -T /tmp/sockets/gamescope.NFjMUaQ/stats.pipe -W 1280 -H 720 -r 60
Xwayland :0 -rootless -core -terminate -listenfd 57 -listenfd 58 -displayfd 62 -noTouchPointerEmulation
/usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable
mangoapp
dbus-run-session -- umu-run /opt/games/Brotato v0.8.0.3/Brotato.exe
dbus-daemon --nofork --print-address 4 --session
sh /usr/bin/umu-run /opt/games/Brotato v0.8.0.3/Brotato.exe
python3 /usr/share/umu/umu_run.py /opt/games/Brotato v0.8.0.3/Brotato.exe
/usr/libexec/ibus-memconf
/home/retro/.local/share/umu/pressure-vessel/libexec/steam-runtime-tools-0/srt-bwrap --args 21 /usr/lib/pressure-vessel/from-host/bin/pressure-vessel-adverb --generate-locales --fd 13 --regenerate-ld.so-cache /var/pressure-vessel/ldso --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu --set-ld-library-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/aliases:/usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu/aliases --overrides-path /usr/lib/pressure-vessel/overrides --exit-with-parent --subreaper --assign-fd=1=3 --assign-fd=2=4 --shell=none --terminal=none -- /home/retro/.local/share/umu/pressure-vessel/bin/steam-runtime-launcher-interface-0 container-runtime /home/retro/.steam/debian-installation/steamapps/common/Proton - Experimental/proton waitforexitandrun /opt/games/Brotato v0.8.0.3/Brotato.exe
/usr/lib/pressure-vessel/from-host/bin/pressure-vessel-adverb --generate-locales --fd 13 --regenerate-ld.so-cache /var/pressure-vessel/ldso --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu --set-ld-library-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/aliases:/usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu/aliases --overrides-path /usr/lib/pressure-vessel/overrides --exit-with-parent --subreaper --assign-fd=1=3 --assign-fd=2=4 --shell=none --terminal=none -- /home/retro/.local/share/umu/pressure-vessel/bin/steam-runtime-launcher-interface-0 container-runtime /home/retro/.steam/debian-installation/steamapps/common/Proton - Experimental/proton waitforexitandrun /opt/games/Brotato v0.8.0.3/Brotato.exe
python3 /home/retro/.steam/debian-installation/steamapps/common/Proton - Experimental/proton waitforexitandrun /opt/games/Brotato v0.8.0.3/Brotato.exe
c:\windows\system32\steam.exe /opt/games/Brotato v0.8.0.3/Brotato.exe
/home/retro/.steam/debian-installation/steamapps/common/Proton - Experimental/files/bin/wineserver
C:\windows\system32\services.exe
C:\windows\system32\winedevice.exe
C:\windows\system32\winedevice.exe
C:\windows\system32\plugplay.exe
C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted
C:\windows\system32\explorer.exe /desktop
C:\windows\system32\rpcss.exe
C:\windows\system32\tabtip.exe
Z:\opt\games\Brotato v0.8.0.3\Brotato.exe

printenv:

NEEDRESTART_SUSPEND=1
PUID=1000
GAMESCOPE_HEIGHT=720
HOSTNAME=4e682a941653
UMASK=000
PWD=/home/retro
TZ=Europe/London
PULSE_SOURCE=virtual_sink_2188150276858045429.monitor
GAMESCOPE_VERSION=3.12.5
PULSE_SINK=virtual_sink_2188150276858045429
HOME=/home/retro
UNAME=retro
PGID=1000
WAYLAND_DISPLAY=wayland-1
GAMESCOPE_WIDTH=1280
RUN_GAMESCOPE=true
TERM=xterm
GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*
BUILD_ARCHITECTURE=amd64
DEB_BUILD_OPTIONS=noddebs
SHLVL=1
PROTON_LOG=1
XDG_RUNTIME_DIR=/tmp/sockets
EXE_PATH=/opt/games/Brotato v0.8.0.3/Brotato.exe
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GAMESCOPE_REFRESH=60
PULSE_SERVER=/tmp/sockets/pulse-socket
DEBIAN_FRONTEND=noninteractive
_=/usr/bin/env
rty813 commented 3 weeks ago

I can start the game and see the graphics normally on SteamDeck using the same umu-run command.

rty813 commented 3 weeks ago

Alright, I have resolved the issue. It was because gamescope should not have the -e parameter, which is intended for Steam. Everything works fine after removing it.