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

Support for pipewire-pulse #46

Closed
KuleRucket opened this issue Feb 9, 2022 · 7 comments
Closed

Support for pipewire-pulse #46

KuleRucket opened this issue Feb 9, 2022 · 7 comments
Labels
help wanted Extra attention is needed os:Linux:Arch OS is Arch Linux

Comments

@KuleRucket
Copy link
Contributor

Describe the bug
On Arch you can use pipewire-pulse in place of pulseaudio as a pulseaudio compatible interface to pipewire. Using pipewire-pulse will completely replace the pulseaudio package. According to the config file and readme, pipewire is supported however when I try to use it I get the core dump exactly as documented in loki-47-6F-64/sunshine#216

To Reproduce
$ sudo pacman -Suy pipewire-pulse
allow removal of conflicting pulseaudio package
start sunshine

Expected behavior
Does not core dump, pipewire supported

Screenshots
See loki-47-6F-64/sunshine#216

Host

  • OS: Arch Linux
  • Architecture: 64 bit
  • Version: 0.11.1
  • GPU Type: Nvidia
  • GPU Model: RTX 3070
  • GPU Driver/Mesa Version: 510.47.03
  • Capture method (Linux only): PipeWire + NvFBC
@ReenigneArcher
Copy link
Member

Related to #39

@ReenigneArcher ReenigneArcher added the help wanted Extra attention is needed label Feb 10, 2022
@KuleRucket
Copy link
Contributor Author

Stack trace:

Thread 20 "sunshine" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fc64cff9000 (LWP 12829)]
0x00007fc6ac21234c in __pthread_kill_implementation () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007fc6ac21234c in __pthread_kill_implementation () at /usr/lib/libc.so.6
#1  0x00007fc6ac1c54b8 in raise () at /usr/lib/libc.so.6
#2  0x00007fc6ac1af534 in abort () at /usr/lib/libc.so.6
#3  0x0000558a1b27b6cb in platf::microphone(unsigned char const*, int, unsigned int, unsigned int)
    (mapping=0x558a1b3f9dd2 <platf::speaker::map_stereo> "", channels=2, sample_rate=48000, frame_size=240)
    at /home/luke/Projects/sunshine/sunshine.git/sunshine/platform/linux/audio.cpp:99
#4  0x0000558a1b27d740 in platf::pa::server_t::microphone(unsigned char const*, int, unsigned int, unsigned int)
    (this=0x7fc6300012d0, mapping=0x558a1b3f9dd2 <platf::speaker::map_stereo> "", channels=2, sample_rate=48000, frame_size=240)
    at /home/luke/Projects/sunshine/sunshine.git/sunshine/platform/linux/audio.cpp:386
#5  0x0000558a1b1e2bf0 in audio::capture(std::shared_ptr<safe::mail_raw_t>, audio::config_t, void*)
    (mail=std::shared_ptr<safe::mail_raw_t> (use count 8, weak count 1) = {...}, config=..., channel_data=0x558a1d7e8020)
    at /home/luke/Projects/sunshine/sunshine.git/sunshine/audio.cpp:178
#6  0x0000558a1b17c2ea in stream::audioThread(stream::session_t*) (session=0x558a1d7e8020)
    at /home/luke/Projects/sunshine/sunshine.git/sunshine/stream.cpp:1294
#7  0x0000558a1b19e09f in std::__invoke_impl<void, void (*)(stream::session_t*), stream::session_t*>(std::__invoke_other, void (*&&)(stream::session_t*), stream::session_t*&&) (__f=@0x558a1d158b00: 0x558a1b17c15d <stream::audioThread(stream::session_t*)>) at /usr/include/c++/11.2.0/bits/invoke.h:61
#8  0x0000558a1b19de72 in std::__invoke<void (*)(stream::session_t*), stream::session_t*>(void (*&&)(stream::session_t*), stream::session_t*&&)
    (__fn=@0x558a1d158b00: 0x558a1b17c15d <stream::audioThread(stream::session_t*)>) at /usr/include/c++/11.2.0/bits/invoke.h:96
#9  0x0000558a1b19dc39 in std::thread::_Invoker<std::tuple<void (*)(stream::session_t*), stream::session_t*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x558a1d158af8) at /usr/include/c++/11.2.0/bits/std_thread.h:253
#10 0x0000558a1b19d96e in std::thread::_Invoker<std::tuple<void (*)(stream::session_t*), stream::session_t*> >::operator()() (this=0x558a1d158af8)
    at /usr/include/c++/11.2.0/bits/std_thread.h:260
#11 0x0000558a1b19d752 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(stream::session_t*), stream::session_t*> > >::_M_run()
    (this=0x558a1d158af0) at /usr/include/c++/11.2.0/bits/std_thread.h:211
#12 0x00007fc6ac5654d4 in std::execute_native_thread_routine(void*) (__p=0x558a1d158af0) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#13 0x00007fc6ac2105c2 in start_thread () at /usr/lib/libc.so.6
#14 0x00007fc6ac295584 in clone () at /usr/lib/libc.so.6
(gdb)

@ReenigneArcher ReenigneArcher added the os:Linux:Arch OS is Arch Linux label Feb 26, 2022
@HomerSp
Copy link
Contributor

HomerSp commented Mar 12, 2022

Does it work if you set audio_sink in the config file to the default sink (pactl info will give you the name)?
It's set to capture from @DEFAULT_MONITOR@ if you don't specify an audio_sink, which on pulseaudio would be the monitor of the default sink (I believe), but it seems like pipewire-pulse doesn't support it properly.
I'm using KDE neon myself, and while it doesn't crash it doesn't actually capture any audio - but setting the sink to my stereo does make it work (though audio is also played on the host). I have to modify the code to set it to capture from sink-sunshine-stereo.monitor to make it work properly.

@KuleRucket
Copy link
Contributor Author

KuleRucket commented Mar 12, 2022

Actually yes, by setting audio sink to the default sink (or default source), I don't get the crash. When I tried this before I think I got the crash whether I set audio_sink or not.

With audio_sink set I now get a brief whitescreen and then moonlight disconnects with "Connection Terminated".
EDIT: ignore that, it's a different issue

@ReenigneArcher
Copy link
Member

Actually yes, by setting audio sink to the default sink (or default source), I don't get the crash. When I tried this before I think I got the crash whether I set audio_sink or not.

Is this issue resolved?

@KuleRucket
Copy link
Contributor Author

The crash is yes, but it still doesn't actually work so it could be closed and a new ticket be created with a new problem description.

@ReenigneArcher
Copy link
Member

The crash is yes, but it still doesn't actually work so it could be closed and a new ticket be created with a new problem description.

Okay, I'm going to close this. If it something that needs to be addressed in sunshine code please submit a new issue. If it is something related to dependencies in Arch, I'd redirect you to the AUR package. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed os:Linux:Arch OS is Arch Linux
Projects
None yet
Development

No branches or pull requests

3 participants