-
Notifications
You must be signed in to change notification settings - Fork 463
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
Can't get snapclient to work raspbian buster (pulseaudio) #779
Comments
Seems like alsa cannot connect to pulse. That's an alsa/setup issue. |
Hello, unfortunetly same issue when trying with snapclient.service journalctl -u snapclient.service: I know that PulseAudio is running per user mode, but my mopidy instance which runs as user: mopidy is working fine (playing music) |
But in mopidy you're using the pulse sink. Again: did you use |
Yes, i tried with --player pulse via: /etc/defaults/snapclient
Try to start snapclient.service
and also tried from command line with
I think I'm missing something, or maybe didnt configure something... |
Is Snapclient in the audio group? (execute |
Yes snapclient is in the audio group:
compared to mopidy:
mopidy is running as user mopidy and group audio I've tried to run:
so same error. I have second Pi - RPI 2B - but same OS (newest Pi OS) and same isssue if I try to run with --player pulse or select soundcard -> PulseServer. I can run snapclint on Pi2 by selecting jack output... but that cannot be done on Pi Zero (becouse currently i do not have any hifi berry) Seems like issue with Pi OS / PulseAudio permissions... |
Is the pulseaudio server running? I also get |
Yes pulseaudio is running (I configured it to start with user pi and configured pi via raspi-config to autologin user pi to console) to make sure its running
Well PulseAudio is installed now by default as stated in release notes for Pi OS - see change from 2020-12-02 |
When using it with Mopidy you specify the server IP. But how does snapclient know what pulse server to connect to? It passes in NULL for that parameter when calling Edit: Found this:
Also:
As I understand it, pulseaudio is only included and running by default for the "full" flavour of Pi OS. It's not yet clear what they plan to do for the lite version but last time I tried it (post 2/12/20) it was not using pulse and it worked as before. Having two different audio configurations for the two flavours is going to be a total mess for everyone so I hope they work it out. |
@kingosticks Thank You very much! Seems that was the issue with settings in PulseAudio (defaults obviously) and snapclient - i guest it dosnt know about local server? And also your're rigt about the mess in Pi OS - the lite version doesnt include PulseAudio and 'normal' version does.
with
It worked, snapclient can start as service! The second pi which is RaspberryPi Zero W - i've installed lite version and didnt do anything (just put server address :) |
Dear Community, I am having similar problems with the PiOs full but with different outcome when I try to impliment your solution. Would you advise what steps to undertake, please... (below is the compy of my post in another branch where I have opened the issue. Do not take it as spam. I copy it here again for the reason more people who know the problem to see it): Before the finall step it seemed exactly my case - all the errors were reproduced step by step. But, when I made the changes marked as a solution: changes to /etc/pulse/client.conf ; default-sink = , everything stopped working completely. Describe it step by step:
I have tried to indicate the ip of the computer where it is all installed and PulseServer too explicitelly: 192.168.1.247 - same result When I try to tell --player pulse, I get this error: pi@raspberrypi:~ $ snapclient -i 3 -s 4 --player pulse UPD: I have checked if PulseAudio server starts when I indicate default server IP and it does not. Am I missing something? |
I'm trying to setup headless RPI Zero W connected over bluetooth to speaker to stream from snapserver. It doesnt work when snapclient is run as service. I can run as user (pi) and then it works fine.
Steps to Reproduce
`pi@sypialnia-pi0:~ $ snapclient -l
0: default
Playback/recording through the PulseAudio sound server
1: null
Discard all samples (playback) or generate zero samples (capture)
2: jack
JACK Audio Connection Kit
3: pulse
PulseAudio Sound Server
4: sysdefault:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
5: dmix:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample mixing device
6: dsnoop:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample snooping device
7: hw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct hardware device without any conversions
8: plughw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Hardware device with all software conversions
9: usbstream:CARD=b1
bcm2835 HDMI 1
USB Stream Output
`
when trying to run snapclient as snapclient user:
`pi@sypialnia-pi0:/usr/share/sounds/alsa $ sudo -u snapclient -g snapclient snapclient -l
0: null
Discard all samples (playback) or generate zero samples (capture)
1: jack
JACK Audio Connection Kit
2: pulse
PulseAudio Sound Server
3: default:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
4: sysdefault:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
5: dmix:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample mixing device
6: dsnoop:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample snooping device
7: hw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct hardware device without any conversions
8: plughw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Hardware device with all software conversions
9: usbstream:CARD=b1
bcm2835 HDMI 1
USB Stream Output`
When trying to run:
`pi@sypialnia-pi0:$ sudo -u snapclient -g snapclient snapclient -s 2 -h 192.168.0.14
2021-01-26 14-16-14.397 [Info] (Connection) Resolving host IP for: 192.168.0.14
2021-01-26 14-16-14.413 [Info] (Connection) Connecting
2021-01-26 14-16-14.443 [Notice] (Connection) Connected to 192.168.0.14
2021-01-26 14-16-14.444 [Info] (Connection) My MAC: "b8:27:eb:e2:ad:93", socket: 8
2021-01-26 14-16-18.010 [Info] (Controller) ServerSettings - buffer: 1000, latency: 0, volume: 100, muted: 0
metadata:{"STREAM":"default"}
2021-01-26 14-16-18.017 [Info] (Controller) Codec: flac, sampleformat: 48000:16:2
2021-01-26 14-16-18.019 [Info] (Player) Player name: alsa, device: pulse, description: PulseAudio Sound Server, idx: 2, sharing mode: unspecified, parameters:
2021-01-26 14-16-18.025 [Info] (Player) Mixer mode: software, parameters:
2021-01-26 14-16-18.027 [Info] (Player) Sampleformat: 48000:16:2, stream: 48000:16:2
2021-01-26 14-16-18.032 [Info] (Alsa) Using buffer_time: 80 ms, fragments: 4
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
2021-01-26 14-16-18.096 [Error] (Alsa) Exception: Can't open pulse, error: Connection refused, code: -111
2021-01-26 14-16-18.105 [Fatal] (Snapclient) Exception: Can't open pulse, error: Connection refused
2021-01-26 14-16-18.115 [Notice] (Snapclient) Snapclient terminated.`
Environment details
The text was updated successfully, but these errors were encountered: