nettings / medianet

A distribution overlay for Raspbian and similar systems to create a JACK-based embedded system for audio processing and streaming. Contract work for [mn] medianet. https://www.medianet-home.de
Other
11 stars 2 forks source link

jackd tries starting before sound.target with Hifiberry DAC+ADC, fails. #135

Open nettings opened 8 months ago

nettings commented 8 months ago

it eventually recovers, but all other sound services do not.

Mar 10 19:36:36 sparckjones kernel: snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: driver name too long 'HifiberryDacpAdc' -> 'HifiberryDacpAd'
Mar 10 19:36:37 sparckjones systemd-logind[432]: New seat seat0.
Mar 10 19:36:37 sparckjones systemd[1]: Started systemd-logind.service - User Login Management.
Mar 10 19:36:37 sparckjones systemd[1]: e2scrub_reap.service: Deactivated successfully.
Mar 10 19:36:37 sparckjones systemd[1]: Finished e2scrub_reap.service - Remove Stale Online ext4 Metadata Check Snapshots.
Mar 10 19:36:37 sparckjones jackd[442]: jackdmp 1.9.21
Mar 10 19:36:37 sparckjones jackd[442]: Copyright 2001-2005 Paul Davis and others.
Mar 10 19:36:37 sparckjones jackd[442]: Copyright 2004-2016 Grame.
Mar 10 19:36:37 sparckjones jackd[442]: Copyright 2016-2022 Filipe Coelho.
Mar 10 19:36:37 sparckjones jackd[442]: jackdmp comes with ABSOLUTELY NO WARRANTY
Mar 10 19:36:37 sparckjones jackd[442]: This is free software, and you are welcome to redistribute it
Mar 10 19:36:37 sparckjones jackd[442]: under certain conditions; see the file COPYING for details
Mar 10 19:36:37 sparckjones jackd[442]: JACK server starting in realtime mode with priority 40
Mar 10 19:36:37 sparckjones jackd[442]: self-connect-mode is "Don't restrict self connect requests"
Mar 10 19:36:37 sparckjones systemd[1]: Finished ufw.service - Uncomplicated firewall.
Mar 10 19:36:37 sparckjones systemd[1]: Reached target network-pre.target - Preparation for Network.
Mar 10 19:36:37 sparckjones systemd[1]: Starting NetworkManager.service - Network Manager...
Mar 10 19:36:37 sparckjones systemd[1]: Starting networking.service - Raise network interfaces...
Mar 10 19:36:37 sparckjones avahi-daemon[415]: Server startup complete. Host name is sparckjones.local. Local service cookie is 4072309149.
Mar 10 19:36:37 sparckjones systemd[1]: Finished networking.service - Raise network interfaces.
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: control open "hw:sndrpihifiberry" (No such device)
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: control open "hw:sndrpihifiberry" (No such device)
Mar 10 19:36:38 sparckjones jackd[442]: creating alsa driver ... hw:sndrpihifiberry|hw:sndrpihifiberry|128|2|48000|0|0|nomon|swmeter|-|32bit
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: control open "hw:sndrpihifiberry" (No such device)
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: control open "hw:sndrpihifiberry" (No such device)
Mar 10 19:36:38 sparckjones jackd[442]: ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for sndrpihifiberry
Mar 10 19:36:38 sparckjones jackd[442]: control open "hw:sndrpihifiberry" (No such device)
Mar 10 19:36:38 sparckjones jackd[442]: Cannot initialize driver
Mar 10 19:36:38 sparckjones jackd[442]: JackServer::Open failed with -1
Mar 10 19:36:38 sparckjones NetworkManager[539]: <info>  [1710095798.1373] NetworkManager (version 1.42.4) is starting... (boot:910b0d26-12bc-4a96-a832-ba2b5fbde466)
Mar 10 19:36:38 sparckjones NetworkManager[539]: <info>  [1710095798.1376] Read config: /etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf) (etc: 00-medianet.conf)
Mar 10 19:36:38 sparckjones NetworkManager[539]: <info>  [1710095798.1559] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Mar 10 19:36:38 sparckjones systemd[1]: Started NetworkManager.service - Network Manager.
Mar 10 19:36:38 sparckjones systemd[1]: Reached target network.target - Network.
Mar 10 19:36:38 sparckjones jackd[442]: Failed to open server
Mar 10 19:36:38 sparckjones NetworkManager[539]: <info>  [1710095798.1880] manager[0x558f4d9000]: monitoring kernel firmware directory '/lib/firmware'.
Mar 10 19:36:38 sparckjones NetworkManager[539]: <info>  [1710095798.1882] monitoring ifupdown state file '/run/network/ifstate'.
Mar 10 19:36:38 sparckjones dbus-daemon[425]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.4' (ui>
Mar 10 19:36:38 sparckjones systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
Mar 10 19:36:38 sparckjones systemd[1]: alsa-state.service - Manage Sound Card State (restore and store) was skipped because of an unmet condition check (ConditionPathExists=/etc/alsa/state>
Mar 10 19:36:38 sparckjones systemd[1]: Starting alsa-restore.service - Save/Restore Sound Card State...
Mar 10 19:36:38 sparckjones systemd[1]: Starting php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager...
Mar 10 19:36:38 sparckjones alsactl[623]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Mar 10 19:36:38 sparckjones systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 10 19:36:38 sparckjones alsactl[623]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Mar 10 19:36:38 sparckjones alsactl[623]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -2
Mar 10 19:36:38 sparckjones systemd[1]: mn_jackd.service: Main process exited, code=exited, status=255/EXCEPTION
Mar 10 19:36:38 sparckjones systemd[1]: Finished alsa-restore.service - Save/Restore Sound Card State.
Mar 10 19:36:38 sparckjones systemd[1]: Reached target sound.target - Sound Card.

mn_jackd.service has "After = sound.target", so wtf?

nettings commented 8 months ago

Tried adding "Wants = sound.target", which appears to fix the issue. systemd semantics are really one-of-a-a-kind...