-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
audio after several hours. some pi's come back others don't #631
Comments
Thanks for the post. Perhaps you could turn on logging in Shairport Sync, setting the log verbosity to 1 (not 2 or 3, as they generate too much diagnostics stuff to be useful over a long period). Then, when it happens again, have a look in the log at the right time and see what it says. |
Thanks for the quick response. I've turned on the logging now so of its working fine now that its being watched. I'll see what happens this week. I have also changed a setting in my router that MIGHT help. |
Is this related to my problem where my rpi3 (2 of them) on wireless drops off after playing music for awhile and then refuses to let me reconnect via airplay because it's in use? My current theory is that it's not handling the occasional wifi dropout but I haven't had a chance to investigate yet. |
These problems can be very hard to understand and resolve, but yeah, your suggestion is very plausible. Turning on a low level of logging may help to find the cause. |
How do I get the logs? Is it in var/log ? |
For example, use something like |
I did some googleing and have a little more data:
|
The other zones are still working and my wife is using them right now, which I'm guessing is why the log on the dead zone is getting written too constantly.
|
Thanks. (I edited your posts to make their layout more readable.) Looking up the line |
Thanks for all the help. Looking at your link it says 4.9.24 fixed the issue. I'm on: |
do the logs persist through a reboot? |
The logs do persist through a reboot, but a lot of stuff gets added. Separately though, it’s generally a good idea to stay up to date. Did you update the firmware using |
I don't recall running the rpi-update. I'll do that now. |
Thanks. It might be important. |
All my Pi's were due for a firmware update. Maybe that will do it. |
After ensuring that all my Pi's have gone through all the updates, including firmware, I've had some issues again today. My Pi 3 has dropped out a couple times but only for a couple seconds and came back.
Also an interesting note, I have set power management off on my iwconfig settings and the Pi's are turning that back on by themselves. I have seen somewhere on the google that this power management is not really on even though it says that it is and that the statement is a bug but maybe that is not true and it is a problem. |
Thanks. I’m pretty sure that I added a command to Regarding the continuing issues, it would be great to try to separate the output device from the source to see what happens. As an experiment, one thing to try would be to use a cheap USB DAC instead of one of the I2S audio output devices, and see if the problem continued with that. My reasoning is that the USB device would not use the same code as the I2S device and if the fault lay in the I2S code, this would circumvent it. (It might even be possible to use the Pi’s built-in audio in the same way rather than the USB DAC. The sound is tolerable for testing purposes — there’s a paragraph or two on getting the most out of it in the README.) |
Another quick thing is to check in the log to see if the “mmap” transfer mode is being used. If it is, turn it off with Remember to uncomment the configuration entry by removing the leading |
A quick question — have you changed the output rate to the DACs? In other words, have you set the output rate at 88,200 or other frame rate? |
I do have a usb sound card but no amp to run it to so that will be an issue. I have not done ANYTHING to my hifiberry amp2. I just plugged it in and it worked (card 1). I don't actually know how to manipulate or check the status of the DAC conversion rate. I need to look into that. I will did through the logs to see if I can find the mmap mode being used like your suggested. Thanks a lot |
Here is a log from one of the Pi zero's when it is working correctly. I don't see any mention of mmap.
|
Thanks. The question about frame rate was prompted by some of the discussion on the other thread, where it seemed that the problem manifested itself at 192,400 or higher. Since you're not doing anything special, the frame rate is 44,100. Unfortunately, I don't have an I2S audio device to hand, but on the device I am using, this is what I get when I play a piece of audio:
If you see the part where it says |
one more data point. I looked in the log for one of the Pi's when it just does a quick drop out but comes back.
I wonder if my PC(iTunes server) is somehow the issue? The Google showed me an issue you worked with a guy (#99) where his PC source was the issue but that was a couple years ago and it looks like you made an adjustment for it? |
Thanks. In that case, the user’s PC was sending audio at a rate that was far outside the expected range of difference between the clocks — it was about 2,000 parts per million, and Shairport Sync had a limit of about 800 ppm. That has since been changed, so Shairport Sync will accommodate a drift of up to about 2,800 ppm. So I don’t think #99 is related to your case. If you want to enable the gathering of statistics in the log, you could get an idea of the drift rate — i’d be surprised if it was more than 200 ppm and it could be much less. Another question — actually two questions: first, what version of Shairport Sync are you running (use |
Mike, you're an awesome guy thanks so much for the help. My shairport-sync -V
I used the raspbian stretch gui to do the install. Is
|
Sorry to drop this. I notice the version of Shairport Sync is 2.8.6, which is pretty old. Would there be any possibility of updating? |
absolutely. I just have to figure out how to do that. I actually did the install using the gui in stretch. I wonder why it directs me to that version? I was thinking that the stretch add/remove program gui was really dumbing things down for the masses (like me) but maybe there is more care and feeding required than meets the eye. |
|
The updated PI is still "locking up". My wife said she was using it until 10:30 ish then after around 11 she tried again and it wouldn't play.
|
And here is my shairport-sync -v output in case this is usefull.
|
Thanks for keeping working on this. I can see that you are getting that "already playing" thing a few times, but I can't see why the previous session is not closed down. If you would be kind enough to install the latest When you install Shairport Sync with |
I’m afraid I don’t have time to debug so I’m glad someone else is working on it.
I’m having the same symptoms on WiFi connected Pis but wired ones never have a problem. Even using external adapter with full signal strength didn’t solve the problem.
Fortunately, only the one that never gets used is still on WiFi but thought it important to confirm this isn’t unique to one user.
Leon Grossman
[email protected]
… On Feb 10, 2018, at 8:50 AM, Mike Brady ***@***.***> wrote:
Thanks for keeping working on this. I can see that you are getting that "already playing" thing a few times, but I can't see why the previous session is not closed down.
If you would be kind enough to install the latest development version, it has some changes and some extra diagnostics, so we might get to see more of what happening when it recurs. The instructions for updating are in UPDATING.md.
When you install Shairport Sync with $ sudo make install, a sample configuration file is installed at /etc/shairport.sync.sample. If you look at the new diagnostic section at the end of that file, you'll see how to enable relative and absolute time messaging in the log. I'd also suggest verbosity level of 2 and statistics enabled. It's a bit noisy, but it might help to see what's happening.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi Mike, first, thanks for all the hard work on shairport-sync. It's an great project. As you requested I installed the latest dev version. -v shows Version: "3.2d27-OpenSSL-Avahi-ALSA-soxr-metadata-sysconfdir:/etc and enabled the diagnostic options. I hope this helps. |
Many thanks for this. I’ll reply tomorrow. |
Well, first off, error -19 means"ENODEV", i.e. "No such device", which makes me think of a device error, i.e. a hardware error. I also see this:
which looks like the start of problems; it might be the point at which the device starts misbehaving. From that point, it looks as if the DAC is accepting data, but only very slowly, which is weird. Then, later on, when Shairport Sync tries to use it again, it comes up with ENODEV. Troubleshooting stuff like this is very difficult. It could be hardware, firmware or software.
I'll keep looking at the logs during the day as I get time. |
Yes, it does looks like a device error, but not like an defective unit. |
It’s really peculiar. I suppose the main thing that Shairport Sync does differently is that it continually checks the latency. |
Hi Mike, I found a workaround for my issue. For future reference: |
That's very interesting, and I'm glad you found it. I've put a little reference to it in the TROUBLESHOOTING page. |
But isn't |
Yes indeed — |
I'm seeing the same stuff: root@raspberrypi:~# uname -a root@raspberrypi:~# /opt/vc/bin/vcgencmd version |
Hmm, thanks. What output device were you using? |
Thanks. It does look like the same problem alright. On the face of it, it looks like a failure the I2S driver. The workaround discovered by @flyingblindonarocketcycle is suggestive of a race condition or a thread "collision" under heavy load, but it's really hard to know. |
I have an update on the audio cutting out behavior. I have discovered that, if I have a remote handy when the audio cuts out on a zone, if I pause the playback for a few seconds and then hit play, the dead zone recovers. When it recovers its good for a while. When it cuts out it appears to be random and after recovery, it could be good for the day.... or not. Don't try to disable and re-enable the zone, leave it alone and just pause the playback. |
Thanks for the update. If you got a chance, you should update to the latest version — there have been a couple of important bug fixes. There’s a Release Candidate in the master branch right now, looking pretty good. TBH, I don’t think the fixes relate to your issues, but then again we don’t know for sure what’s causing them. |
BTW @sebkur1, the Release Candidate has some fixes relating to AirAudio compatibility. |
Pretty sure this has been addressed in more recent versions of Shairport Sync! Closing this inactive issue. Please open a new one if necessary. |
Hi Mike,
Thank you for the tremendous work you have done and for all the support you give. I hate open an issue for audio dropping out as I've searched and found others listed already but I need someone to point me in the right direction.
I just got my setup running this week so it has limited use so far.
I have a Pi3 , 2 Pi0W's and a Yamaha stereo as my multi room set up. All Pi's are setup identically. After considerable playback (I dont know a specific time) some Pi's will drop audio. They will come back in a few seconds usually but yesterday one has gone quiet and not come back. The Pi's are all accessible via VNC viewer. They all have wifi power management off. The (cat5 wired) yamaha stereo never drops.
I did the shairport-sync installs and the alsa eq install using the add software gui in stretch.
I set the host names using the gui in stretch. The only change I made to the shairport-sync.conf was to enable interruptions allow_session_interruption = "yes"; because I would like to be able to hijack a room and play different music from the rest of the house by playing direct from my phone instead of the iTunes machine.
Thanks again.
The text was updated successfully, but these errors were encountered: