Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Airplay 2 troubleshooting
#11
Any thoughts as to the cause?
Reply
#12
@Tim Curtis 

I cranked moOde up to debug logging just in case and looked at /var/log/shairport-sync.log as I set the AirPlay renderer to AirPlay 2 protocol and turned the service on. Here's what I see at the end of the log


Code:
        0.028485417 "ptp-utilities.c:223" Send control message to NQPTP: "/nqptp T"
        0.000909271 "ptp-utilities.c:163" ptp_shm_interface_open with mapped_addr = 0
        0.000708281 "ptp-utilities.c:194" ptp_shm_interface_open -- success!
        0.001091406 "ptp-utilities.c:91" get_nqptp_data -- main and secondary records don't match after 10 attempts!
        0.000517188 "shairport.c:2630" *fatal error: The nqptp service on this system, which is required for Shairport Sync to operate, does not seem to be initialised.
        0.000497916 "shairport.c:1728" emergency exit


Yikes.

According to systemctl the nqptp service, which is needed by shairport-sync for AirPlay 2 timing and synchronization, is running


Code:
pi@Sunroom:/var/log $ systemctl status nqptp
● nqptp.service - NQPTP -- Not Quite PTP
    Loaded: loaded (/lib/systemd/system/nqptp.service; disabled; vendor pres>
    Active: active (running) since Mon 2023-11-13 22:39:47 EST; 8min ago
  Main PID: 18059 (nqptp)
     Tasks: 1 (limit: 421)
       CPU: 2.757s
    CGroup: /system.slice/nqptp.service
            └─18059 /usr/bin/nqptp

Nov 13 22:39:47 Sunroom systemd[1]: Started NQPTP -- Not Quite PTP.

Might it not be starting fast enough? Or something like that?

ETA - rereading the error message more carefully, t suspect timing isn't itself the issue.

Regards,
Kent
Reply
#13
Could be some breakage in the protocol switcher having to do with latest ver of Shairport-sync and nqptp. Maybe nqptp has to be part of the process??

Here are the commands used by the switcher.

Going from 2 to 1
Code:
sudo apt update
sudo moode-apt-mark unhold
sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --allow-downgrades install shairport-sync=3.3.8-1moode1
sudo moode-apt-mark hold

Going from 1 back to 2
Code:
sudo apt update
sudo moode-apt-mark unhold
LATESTVERSION=$(apt search shairport-sync | awk 'NR==3 {print $2}')
sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install shairport-sync=$LATESTVERSION
sudo moode-apt-mark hold
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#14
Yeah, I could see the switching action going on in the moOde log. I have a thought (sometimes that's a good sign; sometimes not so much!) but have to run some errands this AM before I can test it. Later.

Regards,
Kent
Reply
#15
@Tim Curtis 

Merely stopping and starting (or simply restarting) the nqptp service didn't clear the problem. The systemctl clear subcommand got me the response that there were no resources associated with the service or somesuch. 

However,


Code:
sudo apt reinstall nqptp

(ETA - and then starting the setvice)

before turning the renderer back on was sufficient to restore AirPlay2 operation. 

I'm feeling unsettled about this, though. I haven't been able reliably to repro the original issue, which makes me wonder if I treated a symptom rather than a cause.


I'll try again later today.

Regards,
Kent
Reply
#16
I suspect that 2 -> 1 should first remove the nqptp package. Then 1 back to 2 should install nqptp then shairport-sync. IIRC nqptp has to be install first before shairport-sync in order to setup security, comms and other things correctly.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
Seems a safe approach.

Clearly, shairport-sync expects nqptp to have been initialized.

Regards,
Kent
Reply
#18
After some testing it looks like the whole package manipulation process to manage shairport-sync and nqptp is not robust. For example the shairport-sync config file was reverted to default during one of my tests which caused a lot of breakage -0

I suppose if protocol switching were part of shairport-sync itself then no problem.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#19
Well, I'm happy that at least the problem was reproducible and you have a good idea as to the cause!
Let me know if you make any changes that you'd like me to test.
Reply
#20
The protocol switcher process is simply too prone to breakage, especially with the latest shairport-sync and nqptp so it's been removed for upcoming 8.3.7 and only AirPlay 2 is supported going forward.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: