Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunshine cannot detect a running pulseaudio instance by default. #3668

Open
2 tasks done
dElogics opened this issue Feb 15, 2025 · 0 comments
Open
2 tasks done

sunshine cannot detect a running pulseaudio instance by default. #3668

dElogics opened this issue Feb 15, 2025 · 0 comments

Comments

@dElogics
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

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

I'm too lazy to test

Describe the Bug

sunshine fails to detect an existing running pulseaudio instance as a result it launched another instances which cannot grab the hardware audio device because an existing pulseaudio instance is already using it. the newly launched pulseaudio instance tried to repeatedly grab the audio device resulting in 100% CPU utilization. It also results in sunshine crashing after the client (moonlight exits).

If sunshine is started with PULSE_SERVER=/run/user/1000/pulse/native, a new pulseaudio instance is not launched neither sunshine ever crashes.

This is wayland KDE session within no login/display manager. pulseaudio is launched by KDE.

Expected Behavior

No response

Additional Context

I don't think you guys have made any changes to the pulseaudio code since 0.23.1. In case you have, then you ask me to test again the latest by cloning from git (gentoo package manager supports that), however it requires upgrading boost because of which it will trigger a rebuild of many many heavy packages (including libreoffice).

sunshine already links against the system's pulseaudio --

ldd /usr/bin/sunshine | grep pulse
libpulse.so.0 => /usr/lib64/libpulse.so.0 (0x00007fcb54741000)
libpulse-simple.so.0 => /usr/lib64/libpulse-simple.so.0 (0x00007fcb5d0c6000)
libpulsecommon-17.0.so => /usr/lib64/pulseaudio/libpulsecommon-17.0.so (0x00007fcb52775000)

Host Operating System

Linux

Operating System Version

Gentoo (rolling release)

Architecture

amd64/x86_64

Sunshine commit or version

0.23.1

Package

Linux - pkg.tar.zst

GPU Type

Intel

GPU Model

UHD 770

GPU Driver/Mesa Version

24.3.3

Capture Method

KMS (Linux)

Config

origin_web_ui_allowed = wan
audio_sink = alsa_output.pci-0000_00_1f.3.analog-stereo
sw_preset = veryslow
capture = kms
sw_tune = film
min_threads = 20
hevc_mode = 1
external_ip = 192.168.254.2

Apps

Stream desktop

Relevant log output

[external_ip] -- [192.168.254.2]
[hevc_mode] -- [1]
[min_threads] -- [20]
[sw_tune] -- [film]
[capture] -- [kms]
[sw_preset] -- [veryslow]
[audio_sink] -- [alsa_output.pci-0000_00_1f.3.analog-stereo]
[origin_web_ui_allowed] -- [wan]
[2025:02:15:14:28:00]: Info: Sunshine version: 0.23.1
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2025:02:15:14:28:00]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025:02:15:14:28:00]: Info: Trying encoder [nvenc]
[2025:02:15:14:28:00]: Info: Screencasting with KMS
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Error: Couldn't find monitor [0]
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Error: Couldn't find monitor [0]
[2025:02:15:14:28:00]: Info: Screencasting with KMS
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Error: Couldn't find monitor [0]
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Error: Couldn't find monitor [0]
[2025:02:15:14:28:00]: Info: Encoder [nvenc] failed
[2025:02:15:14:28:00]: Info: Trying encoder [vaapi]
[2025:02:15:14:28:00]: Info: Screencasting with KMS
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Info: Found monitor for DRM screencasting
[2025:02:15:14:28:00]: Info: Found connector ID [260]
[2025:02:15:14:28:00]: Info: Found cursor plane [77]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Info: SDR color coding [Rec. 601]
[2025:02:15:14:28:00]: Info: Color depth: 8-bit
libva info: VA-API version 1.22.0
[2025:02:15:14:28:00]: Info: Color range: [JPEG]
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:28:00]: Info: SDR color coding [Rec. 601]
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:28:00]: Info: Color depth: 8-bit
[2025:02:15:14:28:00]: Info: Color range: [JPEG]
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561ceb487e00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:28:00]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561cec08d340] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2025:02:15:14:28:00]: Error: Could not open codec [av1_vaapi]: Function not implemented
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:28:00]: Info: SDR color coding [Rec. 601]
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:28:00]: Info: Color depth: 8-bit
[2025:02:15:14:28:00]: Info: Color range: [JPEG]
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561cec08d340] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:28:00]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561ceb487e00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2025:02:15:14:28:00]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2025:02:15:14:28:00]: Info: Screencasting with KMS
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:28:00]: Info: Found monitor for DRM screencasting
[2025:02:15:14:28:00]: Info: Found connector ID [260]
[2025:02:15:14:28:00]: Info: Found cursor plane [77]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:28:00]: Info: 
[2025:02:15:14:28:00]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025:02:15:14:28:00]: Info: 
[2025:02:15:14:28:00]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025:02:15:14:28:00]: Error: Couldn't find any of the following libraries: [libavahi-common.so.3, libavahi-common.so]
[2025:02:15:14:28:00]: Info: Configuration UI available at [https://localhost:47990]
[2025:02:15:14:28:00]: Info: SDR color coding [Rec. 601]                                                                             
libva info: Found init function __vaDriverInit_1_22                                                                                   
[2025:02:15:14:28:00]: Info: Color depth: 8-bit                                                                                      
[2025:02:15:14:28:00]: Info: Color range: [JPEG]                                                                                      
libva info: va_openDriver() returns 0                                                                                                
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561cec08d340] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32). 
libva info: VA-API version 1.22.0                                                                                                    
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so                                                                     
[2025:02:15:14:28:00]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented      
libva info: Found init function __vaDriverInit_1_22                                                                                   
libva info: va_openDriver() returns 0                                                                                                
[2025:02:15:14:28:00]: Error: [av1_vaapi @ 0x561ceb487e00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32). 
[2025:02:15:14:28:00]: Error: Could not open codec [av1_vaapi]: Function not implemented                                             
[2025:02:15:14:28:00]: Info: Screencasting with KMS                                                                                   
[2025:02:15:14:28:00]: Info: /dev/dri/card0 -> i915                                                                                  
[2025:02:15:14:28:00]: Info: Found monitor for DRM screencasting                                                                      
[2025:02:15:14:28:00]: Info: Found connector ID [260]                                                                                
[2025:02:15:14:28:00]: Info: Found cursor plane [77]                                                                                  
libva info: VA-API version 1.22.0                                                                                                    
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so                                                                     
libva info: Found init function __vaDriverInit_1_22                                                                                  
libva info: va_openDriver() returns 0                                                                                                 
[2025:02:15:14:28:00]: Info:                                                                                                         
[2025:02:15:14:28:00]: Info: // Ignore any errors mentioned above, they are not relevant. //                                          
[2025:02:15:14:28:00]: Info:                                                                                                         
[2025:02:15:14:28:00]: Info: Found H.264 encoder: h264_vaapi [vaapi]                                                                  
[2025:02:15:14:28:00]: Error: Couldn't find any of the following libraries: [libavahi-common.so.3, libavahi-common.so]               
[2025:02:15:14:28:00]: Info: Configuration UI available at [https://localhost:47990]                                                  
[2025:02:15:14:29:12]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //     
[2025:02:15:14:29:12]: Info: Trying encoder [nvenc]
[2025:02:15:14:29:12]: Info: Screencasting with KMS
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Error: Couldn't find monitor [0]
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Error: Couldn't find monitor [0]
[2025:02:15:14:29:12]: Info: Screencasting with KMS
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Error: Couldn't find monitor [0]
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Error: Couldn't find monitor [0]
[2025:02:15:14:29:12]: Info: Encoder [nvenc] failed
[2025:02:15:14:29:12]: Info: Trying encoder [vaapi]
[2025:02:15:14:29:12]: Info: Screencasting with KMS
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Info: Found monitor for DRM screencasting
[2025:02:15:14:29:12]: Info: Found connector ID [260]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:29:12]: Info: Found cursor plane [77]
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
[2025:02:15:14:29:12]: Info: SDR color coding [Rec. 601]
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:29:12]: Info: Color depth: 8-bit
[2025:02:15:14:29:12]: Info: Color range: [JPEG]
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
[2025:02:15:14:29:12]: Info: SDR color coding [Rec. 601]
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:29:12]: Info: Color depth: 8-bit
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:29:12]: Info: Color range: [JPEG]
libva info: va_openDriver() returns 0
[2025:02:15:14:29:12]: Error: [av1_vaapi @ 0x7f86942b6100] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:29:12]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: va_openDriver() returns 0
[2025:02:15:14:29:12]: Error: [av1_vaapi @ 0x7f86953bc880] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2025:02:15:14:29:12]: Error: Could not open codec [av1_vaapi]: Function not implemented
libva info: VA-API version 1.22.0
[2025:02:15:14:29:12]: Info: SDR color coding [Rec. 601]
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:29:12]: Info: Color depth: 8-bit
libva info: Found init function __vaDriverInit_1_22
[2025:02:15:14:29:12]: Info: Color range: [JPEG]
libva info: va_openDriver() returns 0
[2025:02:15:14:29:12]: Error: [av1_vaapi @ 0x7f86953bc880] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2025:02:15:14:29:12]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:29:12]: Error: [av1_vaapi @ 0x7f86942b6100] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2025:02:15:14:29:12]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2025:02:15:14:29:12]: Info: Screencasting with KMS
[2025:02:15:14:29:12]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:12]: Info: Found monitor for DRM screencasting
[2025:02:15:14:29:12]: Info: Found connector ID [260]
[2025:02:15:14:29:12]: Info: Found cursor plane [77]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:29:12]: Info: 
[2025:02:15:14:29:12]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025:02:15:14:29:12]: Info: 
[2025:02:15:14:29:12]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025:02:15:14:29:12]: Info: Executing [Desktop]
[2025:02:15:14:29:14]: Info: CLIENT CONNECTED
[2025:02:15:14:29:14]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:14]: Info: Screencasting with KMS
[2025:02:15:14:29:14]: Info: /dev/dri/card0 -> i915
[2025:02:15:14:29:14]: Info: Found monitor for DRM screencasting
[2025:02:15:14:29:14]: Info: Found connector ID [260]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[2025:02:15:14:29:14]: Info: Found cursor plane [77]
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:29:14]: Info: SDR color coding [Rec. 601]
[2025:02:15:14:29:14]: Info: Color depth: 8-bit
[2025:02:15:14:29:14]: Info: Color range: [MPEG]
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[2025:02:15:14:29:29]: Info: CLIENT DISCONNECTED
[2025:02:15:14:29:39]: Fatal: Hang detected! Session failed to terminate in 10 seconds.
Trace/breakpoint trap (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant