Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Gamescope embedded session results in RTSP timeout

Open chaitan3 opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your issue described in the documentation?

  • [X] I have read the documentation

Is your issue present in the nightly release?

  • [X] This issue is present in the nightly release

Describe the Bug

Starting gamescope embedded session (launched from tty) with sunshine results in RTSP timeout in Moonlight client. Launching gamescope nested session (in sway desktop) with sunshine works with the same Moonlight client. The app that is launched is Lutris, but I tested with other apps like xterm.

Command for launching gamescope from tty: gamescope sunshine

Expected Behavior

No response

Additional Context

No response

Host Operating System

Linux

Operating System Version

Archlinux

Architecture

64 bit

Sunshine commit or version

0.21.0

Package

Linux - AUR (Third Party)

GPU Type

AMD

GPU Model

6700XT

GPU Driver/Mesa Version

23.3.1

Capture Method (Linux Only)

Not sure (gamescope?)

Config

Empty

Apps

No response

Relevant log output

[2023:12:22:15:06:29]: Info:
[2023:12:22:15:06:29]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:12:22:15:06:29]: Info:
[2023:12:22:15:06:29]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2023:12:22:15:06:29]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2023:12:22:15:06:29]: Info: Executing: [xterm] in ["/usr/bin"]
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x56047241abd0 (res 0x5604723c4a00)
xwm: got the same buffer committed twice, ignoring.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> 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
[2023:12:22:15:06:29]: Info: Setting default sink to: [sink-sunshine-stereo]
[2023:12:22:15:06:29]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2023:12:22:15:06:39]: Error: Initial Ping Timeout
[2023:12:22:15:06:39]: Info: Setting default sink to: [alsa_output.pci-0000_03_00.1.hdmi-stereo-extra4]
[2023:12:22:15:06:39]: Info: 192.168.3.4: Ping Timeout
[2023:12:22:15:07:04]: Fatal: Hang detected! Session failed to terminate in 10 seconds.
wlserver: [backend/libinput/events.c:139] Removing Keyboard passthrough [48879:57005]
wlserver: [backend/libinput/events.c:139] Removing Touchscreen passthrough [48879:57005]
wlserver: [backend/libinput/events.c:139] Removing Logitech Wireless Mouse PID:4038 [1133:16440]

chaitan3 avatar Dec 22 '23 20:12 chaitan3

I got the same idea to provide a gamescope display to sunshine so we can just setup the display however we want (without and EDID dongle). Then direct the app or game to this display.

I got this working with: SDL_VIDEODRIVER=x11 gamescope -h 1080 -H 1080 --headless -- sunshine ./sunshine.conf. Direct an app: DISPLAY=:2 glxgears -geometry 1920x1080 -fullscreen

I configured sunshine to use X11 capture. I'm not sure what --headless does... glxgears is always displayed.

Sunshine logs:

[2024:01:17:13:05:11]: Info: Screencasting with X11
[2024:01:17:13:05:11]: Info: Configuring selected monitor (0) to stream
[2024:01:17:13:05:11]: Info: Streaming display: gamescope with res 1920x1080 offset by 0x0

Moonlight connects fine:

  • Only cursor is displayed and controllable;
  • outputs only a black screen;
  • stats show an active stream;
  • kms did not work at all;
  • wayland and gnome gave same results.

Spend an evening tinkering with settings but I have very limited knowledge about how this al works internally so this how far I got. I guess sunshine has to support this in her capture methods.

This was on Fedora 39 Gnome with an AMD RX 6650XT on wayland and gnome. Would be a nice feature!

PVermeer avatar Jan 17 '24 12:01 PVermeer

I don't think headless does anything relevant.

I tried the setup in the original post again and can confirm that there is in connection timeout error in the moonlight client on the first attempt. But, on the second try moonlight connects to sunshine and streams the display correctly but with two mouse pointers instead of one. There are some bugs around app closure though.

chaitan3 avatar Jan 18 '24 03:01 chaitan3

It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!

LizardByte-bot avatar Apr 17 '24 10:04 LizardByte-bot

This issue was closed because it has been stalled for 10 days with no activity.

LizardByte-bot avatar Apr 28 '24 10:04 LizardByte-bot

I came to the same idea as https://github.com/LizardByte/Sunshine/issues/1928#issuecomment-1895703717 but hit the same road block. Has anyone had any luck in getting this to work?

Garulf avatar Jul 20 '24 07:07 Garulf