LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
19.69k stars 954 forks source link

Flatpak version: without audio or without video #2839

Closed cjuniorfox closed 3 weeks ago

cjuniorfox commented 4 months ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

I am running Fedora 40, Silverblue/Atomic version (a fork of the Ublue project that I made) with Hyprland Hyprland Atomic and I am having the following issues:

Following the docs, starting with the command: sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.app.Sunshine I'm having the following error:

[2024:07:12:19:04:18]: Error: Unable to initialize capture method
[2024:07:12:19:04:18]: Error: Platform failed to initialize
[2024:07:12:19:04:19]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:07:12:19:04:19]: Info: Trying encoder [nvenc]
[2024:07:12:19:04:19]: Info: Encoder [nvenc] failed
[2024:07:12:19:04:19]: Info: Trying encoder [vaapi]
[2024:07:12:19:04:19]: Info: Encoder [vaapi] failed
[2024:07:12:19:04:19]: Info: Trying encoder [software]
[2024:07:12:19:04:20]: Info: Encoder [software] failed
[2024:07:12:19:04:20]: Fatal: Unable to find display or encoder during startup.
[2024:07:12:19:04:20]: Fatal: Please check that a display is connected and powered on.
[2024:07:12:19:04:20]: Error: Video failed to find working encoder

And with that, I was unable to stream the display device.

How, running directly, without using sudo and not setting the PULSE_SERVER variable, flatpak run dev.lizardbyte.app.Sunshine I was able to stream the display device with no issues, but without sound. I'm running the following version of Sunshine: v2024.710.151651

Expected Behavior

Having video and sound in both situations or, at least, at the most appropriated one.

Additional Context

Fedora 40 Hyprland, as mentioned, AMD Radeon GPU RX 6700 XT.

Host Operating System

Linux

Operating System Version

Fedora 40 - 6.9.7-200.fc40.x86_64

Architecture

32 bit

Sunshine commit or version

Sunshine version: v2024.710.151651

Package

Linux - flatpak

GPU Type

AMD

GPU Model

6700 XT

GPU Driver/Mesa Version

GLX_MESA_query_renderer 24.1.2

Capture Method

wlroots (Linux)

Config

output_name = 1

Apps

{
  "env": {
    "PATH": "$(PATH):$(HOME)/.local/bin"
  },
  "apps": [
    {
      "name": "Desktop",
      "image-path": "desktop.png"
    }
  ]
}

Relevant log output

Running with sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}')   flatpak run dev.lizardbyte.app.Sunshine

[2024:07:12:19:26:56]: Warning: Failed to create system tray
Cannot load libcuda.so.1
[2024:07:12:19:26:56]: Error: Couldn't load cuda: -1
[2024:07:12:19:26:56]: Info: /dev/dri/card1 -> amdgpu
[2024:07:12:19:26:56]: Error: Couldn't get handle for DRM Framebuffer [150]: Probably not permitted
[2024:07:12:19:26:56]: Error: You must run [sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))] for KMS display capture to work!
If you installed from AppImage or Flatpak, please refer to the official documentation:
https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/setup.html#install
[2024:07:12:19:26:56]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2024:07:12:19:26:56]: Info: Detecting displays
Authorization required, but no authorization protocol specified

[2024:07:12:19:26:56]: Error: Unable to initialize capture method
[2024:07:12:19:26:56]: Error: Platform failed to initialize
[2024:07:12:19:26:56]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:07:12:19:26:56]: Info: Trying encoder [nvenc]
[2024:07:12:19:26:56]: Info: Encoder [nvenc] failed
[2024:07:12:19:26:56]: Info: Trying encoder [vaapi]
[2024:07:12:19:26:57]: Info: Encoder [vaapi] failed
[2024:07:12:19:26:57]: Info: Trying encoder [software]
[2024:07:12:19:26:57]: Info: Encoder [software] failed
[2024:07:12:19:26:57]: Fatal: Unable to find display or encoder during startup.
[2024:07:12:19:26:57]: Fatal: Please check that a display is connected and powered on.
[2024:07:12:19:26:57]: Error: Video failed to find working encoder
[2024:07:12:19:26:57]: Info: Adding avahi service Sunshine
[2024:07:12:19:26:57]: Info: Configuration UI available at [https://localhost:47990]
[2024:07:12:19:26:58]: Info: Avahi service Sunshine successfully established.

Without sudo

[output_name] -- [1]
[2024:07:12:19:32:09]: Info: Sunshine version: v2024.710.151651

(process:2): Gtk-WARNING **: 19:32:09.741: Locale not supported by C library.
    Using the fallback 'C' locale.
Cannot load libcuda.so.1
[2024:07:12:19:32:09]: Error: Couldn't load cuda: -1
[2024:07:12:19:32:09]: Info: Found display [wayland-1]
[2024:07:12:19:32:09]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:09]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:09]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:09]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:09]: Info: Resolution: 2560x1080
[2024:07:12:19:32:09]: Info: Resolution: 1024x768
[2024:07:12:19:32:09]: Info: Name: DP-1
[2024:07:12:19:32:09]: Info: Found monitor: LG Electronics LG ULTRAWIDE 0x01010101 (DP-1)
[2024:07:12:19:32:09]: Info: Offset: 0x0
[2024:07:12:19:32:09]: Info: Logical size: 2560x1080
[2024:07:12:19:32:09]: Info: Name: HEADLESS-2
[2024:07:12:19:32:09]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:09]: Info: Offset: 2560x0
[2024:07:12:19:32:09]: Info: Logical size: 1024x768
[2024:07:12:19:32:09]: Info: -------- Start of Wayland monitor list --------
[2024:07:12:19:32:09]: Info: Monitor 0 is DP-1: LG Electronics LG ULTRAWIDE 0x01010101 (DP-1)
[2024:07:12:19:32:09]: Info: Monitor 1 is HEADLESS-2: Headless output 2
[2024:07:12:19:32:09]: Info: --------- End of Wayland monitor list ---------
[2024:07:12:19:32:09]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:07:12:19:32:09]: Info: Trying encoder [nvenc]
[2024:07:12:19:32:09]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:09]: Info: Found display [wayland-1]
[2024:07:12:19:32:09]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:09]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:09]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:09]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:09]: Info: Resolution: 1024x768
[2024:07:12:19:32:09]: Info: Name: HEADLESS-2
[2024:07:12:19:32:09]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:09]: Info: Offset: 2560x0
[2024:07:12:19:32:09]: Info: Logical size: 1024x768
[2024:07:12:19:32:09]: Info: Selected monitor [Headless output 2] for streaming
Cannot load libcuda.so.1
[2024:07:12:19:32:09]: Error: Couldn't load cuda: -1
Cannot load libcuda.so.1
[2024:07:12:19:32:09]: Error: Couldn't load cuda: -1
[2024:07:12:19:32:09]: Info: Encoder [nvenc] failed
[2024:07:12:19:32:09]: Info: Trying encoder [vaapi]
[2024:07:12:19:32:09]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:09]: Info: Found display [wayland-1]
[2024:07:12:19:32:09]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:09]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:09]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:09]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:09]: Info: Resolution: 1024x768
[2024:07:12:19:32:09]: Info: Name: HEADLESS-2
[2024:07:12:19:32:09]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:09]: Info: Offset: 2560x0
[2024:07:12:19:32:09]: Info: Logical size: 1024x768
[2024:07:12:19:32:09]: Info: Selected monitor [Headless output 2] for streaming
[2024:07:12:19:32:09]: Info: System tray created
[2024:07:12:19:32:09]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:09]: Info: Color depth: 8-bit
[2024:07:12:19:32:09]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [h264_vaapi @ 0x557f91697c80] No usable encoding entrypoint found for profile VAProfileH264High (7).
[2024:07:12:19:32:09]: Info: Retrying with fallback configuration options for [h264_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Warning: [h264_vaapi @ 0x557f916f8a40] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:09]: Error: Invalid value at rbsp_stop_one_bit: bitstream ended.
[2024:07:12:19:32:09]: Error: Failed to read unit 4 (type 12).
[2024:07:12:19:32:09]: Error: Couldn't read packet: Invalid data found when processing input
[2024:07:12:19:32:09]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:09]: Info: Color depth: 8-bit
[2024:07:12:19:32:09]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [hevc_vaapi @ 0x557f91651c40] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
[2024:07:12:19:32:09]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Warning: [hevc_vaapi @ 0x557f915f1180] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).

(sunshine:2): Gtk-CRITICAL **: 19:32:09.880: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[2024:07:12:19:32:09]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:09]: Info: Color depth: 8-bit
[2024:07:12:19:32:09]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [av1_vaapi @ 0x557f9277d280] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:09]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [av1_vaapi @ 0x557f916a5f00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:09]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:07:12:19:32:09]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:09]: Info: Color depth: 8-bit
[2024:07:12:19:32:09]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [av1_vaapi @ 0x557f91c2e680] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:09]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [av1_vaapi @ 0x557f9157b1c0] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:09]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:07:12:19:32:09]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:09]: Info: Found display [wayland-1]
[2024:07:12:19:32:09]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:09]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:09]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:09]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:09]: Info: Resolution: 1024x768
[2024:07:12:19:32:09]: Info: Name: HEADLESS-2
[2024:07:12:19:32:09]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:09]: Info: Offset: 2560x0
[2024:07:12:19:32:09]: Info: Logical size: 1024x768
[2024:07:12:19:32:09]: Info: Selected monitor [Headless output 2] for streaming
[2024:07:12:19:32:09]: Info: SDR color coding [Rec. 709]
[2024:07:12:19:32:09]: Info: Color depth: 10-bit
[2024:07:12:19:32:09]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Error: [hevc_vaapi @ 0x557f916ffd00] No usable encoding entrypoint found for profile VAProfileHEVCMain10 (18).
[2024:07:12:19:32:09]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:09]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:09]: Warning: [hevc_vaapi @ 0x557f9184a700] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:09]: Warning: vaapi: h264 missing sps->vui parameters
[2024:07:12:19:32:09]: Info: 
[2024:07:12:19:32:09]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:07:12:19:32:09]: Info: 
[2024:07:12:19:32:09]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:07:12:19:32:09]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:07:12:19:32:09]: Info: Adding avahi service Sunshine
[2024:07:12:19:32:09]: Info: Configuration UI available at [https://localhost:47990]
[2024:07:12:19:32:10]: Info: Avahi service Sunshine successfully established.
[2024:07:12:19:32:13]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:07:12:19:32:13]: Info: Trying encoder [nvenc]
[2024:07:12:19:32:13]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:13]: Info: Found display [wayland-1]
[2024:07:12:19:32:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:13]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:13]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:13]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:13]: Info: Resolution: 1024x768
[2024:07:12:19:32:13]: Info: Name: HEADLESS-2
[2024:07:12:19:32:13]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:13]: Info: Offset: 2560x0
[2024:07:12:19:32:13]: Info: Logical size: 1024x768
[2024:07:12:19:32:13]: Info: Selected monitor [Headless output 2] for streaming
Cannot load libcuda.so.1
[2024:07:12:19:32:13]: Error: Couldn't load cuda: -1
[2024:07:12:19:32:13]: Info: Encoder [nvenc] failed
[2024:07:12:19:32:13]: Info: Trying encoder [vaapi]
[2024:07:12:19:32:13]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:13]: Info: Found display [wayland-1]
[2024:07:12:19:32:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:13]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:13]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:13]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:13]: Info: Resolution: 1024x768
[2024:07:12:19:32:13]: Info: Name: HEADLESS-2
[2024:07:12:19:32:13]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:13]: Info: Offset: 2560x0
[2024:07:12:19:32:13]: Info: Logical size: 1024x768
[2024:07:12:19:32:13]: Info: Selected monitor [Headless output 2] for streaming
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:13]: Info: Color depth: 8-bit
[2024:07:12:19:32:13]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [h264_vaapi @ 0x7f89a42d4a40] No usable encoding entrypoint found for profile VAProfileH264High (7).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [h264_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Warning: [h264_vaapi @ 0x7f89a451ec40] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:13]: Error: Invalid value at rbsp_stop_one_bit: bitstream ended.
[2024:07:12:19:32:13]: Error: Failed to read unit 4 (type 12).
[2024:07:12:19:32:13]: Error: Couldn't read packet: Invalid data found when processing input
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:13]: Info: Color depth: 8-bit
[2024:07:12:19:32:13]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [hevc_vaapi @ 0x7f89a43330c0] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Warning: [hevc_vaapi @ 0x7f89a438af00] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:13]: Info: Color depth: 8-bit
libva info: VA-API version 1.18.0
[2024:07:12:19:32:13]: Info: Color range: [JPEG]
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [av1_vaapi @ 0x7f89a4386dc0] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [av1_vaapi @ 0x7f89a42a8b80] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:13]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:13]: Info: Color depth: 8-bit
[2024:07:12:19:32:13]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [av1_vaapi @ 0x7f89a4014180] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [av1_vaapi @ 0x7f89a4364b00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:07:12:19:32:13]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:07:12:19:32:13]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:13]: Info: Found display [wayland-1]
[2024:07:12:19:32:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:13]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:13]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:13]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:13]: Info: Resolution: 1024x768
[2024:07:12:19:32:13]: Info: Name: HEADLESS-2
[2024:07:12:19:32:13]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:13]: Info: Offset: 2560x0
[2024:07:12:19:32:13]: Info: Logical size: 1024x768
[2024:07:12:19:32:13]: Info: Selected monitor [Headless output 2] for streaming
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 709]
[2024:07:12:19:32:13]: Info: Color depth: 10-bit
[2024:07:12:19:32:13]: Info: Color range: [JPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [hevc_vaapi @ 0x7f89a4292940] No usable encoding entrypoint found for profile VAProfileHEVCMain10 (18).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Warning: [hevc_vaapi @ 0x7f89a453a240] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:13]: Warning: vaapi: h264 missing sps->vui parameters
[2024:07:12:19:32:13]: Info: 
[2024:07:12:19:32:13]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:07:12:19:32:13]: Info: 
[2024:07:12:19:32:13]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:07:12:19:32:13]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:07:12:19:32:13]: Info: Executing [Desktop]

(sunshine:2): Gtk-CRITICAL **: 19:32:13.640: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(sunshine:2): libnotify-WARNING **: 19:32:13.642: Running in confined mode, using Portal notifications. Some features and hints won't be supported
[2024:07:12:19:32:13]: Info: CLIENT CONNECTED
[2024:07:12:19:32:13]: Info: Found display [wayland-1]
[2024:07:12:19:32:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:13]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:13]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:13]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:13]: Info: Resolution: 2560x1080
[2024:07:12:19:32:13]: Info: Resolution: 1024x768
[2024:07:12:19:32:13]: Info: Name: DP-1
[2024:07:12:19:32:13]: Info: Found monitor: LG Electronics LG ULTRAWIDE 0x01010101 (DP-1)
[2024:07:12:19:32:13]: Info: Offset: 0x0
[2024:07:12:19:32:13]: Info: Logical size: 2560x1080
[2024:07:12:19:32:13]: Info: Name: HEADLESS-2
[2024:07:12:19:32:13]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:13]: Info: Offset: 2560x0
[2024:07:12:19:32:13]: Info: Logical size: 1024x768
[2024:07:12:19:32:13]: Info: -------- Start of Wayland monitor list --------
[2024:07:12:19:32:13]: Info: Monitor 0 is DP-1: LG Electronics LG ULTRAWIDE 0x01010101 (DP-1)
[2024:07:12:19:32:13]: Info: Monitor 1 is HEADLESS-2: Headless output 2
[2024:07:12:19:32:13]: Info: --------- End of Wayland monitor list ---------
[2024:07:12:19:32:13]: Info: Screencasting with Wayland's protocol
[2024:07:12:19:32:13]: Info: Found display [wayland-1]
[2024:07:12:19:32:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(7) version 1
[2024:07:12:19:32:13]: Info: Found interface: zxdg_output_manager_v1(48) version 3
[2024:07:12:19:32:13]: Info: Found interface: wl_output(49) version 4
[2024:07:12:19:32:13]: Info: Found interface: wl_output(50) version 4
[2024:07:12:19:32:13]: Info: Resolution: 1024x768
[2024:07:12:19:32:13]: Info: Name: HEADLESS-2
[2024:07:12:19:32:13]: Info: Found monitor: Headless output 2
[2024:07:12:19:32:13]: Info: Offset: 2560x0
[2024:07:12:19:32:13]: Info: Logical size: 1024x768
[2024:07:12:19:32:13]: Info: Selected monitor [Headless output 2] for streaming
[2024:07:12:19:32:13]: Info: SDR color coding [Rec. 601]
[2024:07:12:19:32:13]: Info: Color depth: 8-bit
[2024:07:12:19:32:13]: Info: Color range: [MPEG]
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Error: [h264_vaapi @ 0x7f899829a080] No usable encoding entrypoint found for profile VAProfileH264High (7).
[2024:07:12:19:32:13]: Info: Retrying with fallback configuration options for [h264_vaapi] after error: Function not implemented
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[2024:07:12:19:32:13]: Info: vaapi vendor: Mesa Gallium driver 24.0.7 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 15.0.7, DRM 3.57, 6.9.7-200.fc40.x86_64)
[2024:07:12:19:32:13]: Warning: [h264_vaapi @ 0x7f899835fe80] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:07:12:19:32:13]: Error: Invalid value at rbsp_stop_one_bit: bitstream ended.
[2024:07:12:19:32:13]: Error: Failed to read unit 4 (type 12).
[2024:07:12:19:32:13]: Error: Couldn't read packet: Invalid data found when processing input
[2024:07:12:19:32:14]: Info: Setting default sink to: [sink-sunshine-stereo]
[2024:07:12:19:32:14]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2024:07:12:19:32:14]: Info: Opus initialized: 48 kHz, 2 channels, 96 kbps (total), LOWDELAY
cjuniorfox commented 4 months ago

I managed to make sound work with a workaround. The issue seems to be related to the language of my Linux machine. I'm running with LANG=pt_BR.utf-8, and feels like the scripts for detecting the sound output assume that you're executing with LANG=en_US. So, by setting the environment variable LANG as en, I got the sound fully working again. Here is my Sunshine's Systemd-unit:

default.target.wants/ sunshine.service      
[junior@zentac ~]$ cat ~/.config/systemd/user/sunshine.service 
[Unit]
Description=Self-hosted game stream host for Moonlight
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
Environment=LANG=en_US.UTF-8
ExecStart=/usr/bin/flatpak run dev.lizardbyte.app.Sunshine
ExecStop=/usr/bin/flatpak kill dev.lizardbyte.app.Sunshine
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=xdg-desktop-autostart.target
gschintgen commented 4 months ago

Thanks for reporting the localization issue.

An alternative could be to use this:

$ pactl -f json info | jq -r '.server_string'
/run/user/1000/pulse/native

but that would require adding jq as a dependency.

As long as the flatpak has KMS support there should probably be a wrapper script, e.g. sunshine_kms.sh, installed by the additional-install.sh. This script could then encapsulate all the ugliness of launching the flatpak... Also sunshine_kms.desktop should be mentioned prominently in the documentation.

As for the primary issue here (no sound when launching as regular user with a non-KMS capture method), I don't know.

LizardByte-bot commented 1 month ago

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!