Sunshine
Sunshine copied to clipboard
Error: Couldn't connect to pulseaudio: Access denied
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
Describe the Bug
[2022:11:19:15:13:43]: Error: Couldn't connect to pulseaudio: Access denied [2022:11:19:15:13:43]: Warning: There will be no audio
Expected Behavior
No response
Additional Context
I tried in linux/nvidia/pipewire, and get the same result.
Host Operating System
Linux
Operating System Version
Archlinux(linux-zen)
Architecture
64 bit
Sunshine commit or version
0.15.0
Package
Linux - AUR
GPU Type
Nvidia
GPU Model
GTX 750ti
GPU Driver/Mesa Version
Nvidia-dkms 520.56.06
Capture Method (Linux Only)
X11/pulseaudio
Relevant log output
No response
You should be using our AUR package instead of RPM...
https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/installation.html#aur-package
@ReenigneArcher nonono, there's no "aur" selection. Actually what I used is AUR.
Okay...
I had the same problem, trying to delete ~/.config/pulse/
seems to solve it.
same problem. Couldn't connect to pulseaudio on Fedora37 and manjaro...Where problem can be? i read problem can be in pipeware newest version.
I have the same exact problem (tried on Pop_OS both 20.04 LTS and 22.04 LTS [only 22.04 LTS uses PipeWire as far as I can tell so I doubt that this is the root of the problem]).
[2023:01:02:08:42:45]: Error: Couldn't connect to pulseaudio: Access denied [2023:01:02:08:42:45]: Warning: There will be no audio
Having the same issue on EndeavourOS. Here is my log.
[2023:01:03:20:58:16]: Debug: Start capturing Audio [2023:01:03:20:58:16]: Debug: Connecting to pulseaudio [2023:01:03:20:58:16]: Debug: Pulseadio context failed [2023:01:03:20:58:16]: Error: Couldn't connect to pulseaudio: Access denied [2023:01:03:20:58:16]: Warning: There will be no audio
Hello, I have the same problem on Ubuntu 22.04. How to add permission to pulseaudio or any other solution?
Error: Couldn't connect to pulseaudio: Access denied
Had the same problem, turns out I've been running sunshine daemon as root, not desktop user. When i changed it, everything started working.
I have the same issue.
Downloaded the AUR package, however I always get Couldn't connect to pulseaudio: Access denied
error.
I start sunshine from terminal via sudo sunshine
.
Is there something I'm doing wrong?
Does no one care about this issue? A lot of people on Linux are having this problem.
Do not start with sudo and all be good
Do not start with sudo and all be good
Thanks for answering, however I tried that already.
When I start it only with sunshine
, I get following error:
I am on KDE Wayland, and have 2 monitors (2560x1440 and 1920x1080) if it matters.
Do not use wayland.. i think)
That's unfortunate. That should definitely be noted somewhere that it only fully works on X11 and only partially on Wayland.
The original problem was with X11/pulse. This latest problem seems to be something different and relates to screen capture. Does it work with KMS capture? I.e. first running the setcap command indicated in the log.
The original problem was with X11/pulse. This latest problem seems to be something different and relates to screen capture. Does it work with KMS capture? I.e. first running the setcap command indicated in the log.
Hasn't worked unfortunately:
"sunshine" is a link. You need to dereference it:
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
"sunshine" is a link. You need to dereference it:
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
Damn, that actually worked! Thanks a bunch!! Two things:
- What did that command actually do right now?
- I noticed that I had to configure web ui from scratch after running sunshine via
sunshine
after using that command from above. Doessudo sunshine
andsunshine
store config files in different places?
Sunshine tries 4 different capture methods in this order: nvfbc, Wayland DMABUF, KMS, X11. It you have an nvidia card nvfbc would give the best performance but you have to patch the nvidia drivers. It looked like none of those methods worked for you before so the capture image was 0x0. Now you have a capture method working.
Rather than running sunshine as a command you should run it as a systemd service to start automatically (sudo systemctl --user enable --now sunshine). If you have to run it manually, don't use sudo.
Anyway, ask on discord for more info as this bug report is hijacked enough.
Sunshine tries 4 different capture methods in this order: nvfbc, Wayland DMABUF, KMS, X11. It you have an nvidia card nvfbc would give the best performance but you have to patch the nvidia drivers. It looked like none of those methods worked for you before so the capture image was 0x0. Now you have a capture method working.
Rather than running sunshine as a command you should run it as a systemd service to start automatically (sudo systemctl enable --now sunshine). If you have to run it manually, don't use sudo.
Anyway, ask on discord for more info as this bug report is hijacked enough.
Thanks for the explanation!
I did ask on Discord first (created a dedicated thread), however no one responded there.
@Smokus we're very busy with all the issues, discussions, and discord posts so sometimes it takes a while to answer everyone. The solution to your problem is on docs: https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#linux
Anyway, glad it's working for you now. I'm hiding all these off topic posts.
I'm getting this same issue, latest release ubuntu package on Linux Mint. Looked through the docs and couldn't find any solution to the issue.
faced the same issue on fedora 37 - after tinkering with pipewire, decided to switch back to pulse -- now the sound is coming from the PC Speaker, not streamed
tried to configure the sinks in the webUI - no luck ... always sound from PC Speaker
is sunshine supposed to create it's own sink, which i have to point to (if yes - none existing).
installation was via official package
This issue is stale because it has been open for 90 days with no activity. Comment or remove the stale label, otherwise this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.
Same problem with the Flatpak version on KaOS.
I'm having this issue too and I think it has to do with the fact that I'm running sunshine as root, but pulseaudio is under the user. It seems like the correct thing is to not run sunshine as root, but that doesn't work for me for other reasons. Has anyone solved this since?
I managed to fix this by not running sunshine as root, but rather my user. I fixed the non-root issues by following the Linux install instructions more closely (specifically, I hadn't done "Enable permissions for KMS capture" properly).