ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

dac model ess 9018.

I want to use a rotary encoder (which is working now) and for that it has to be set under playback option (mixer type) on software.
unfortunately when i do this (mixer typ on software) spotify occasionally interrupts with plug-in connect2.

if the rotary encoder is not used (plug-in off) it happens occasionally and rotary enabled more often.

when mixer type is on non the problem is not present, in order to use the rotary encoder it must be set to mixer type otherwise the rotary encoder will not work for the volume option.
just play radio no problem with software mixer set to on or off.

Starting Live Log...
Started Handle events from IR remotes decoded by lircd(8).
pam_unix(sudo:session): session closed for user root
info: ir_controller: systemctl restart irexec.service succeeded.
lircd-0.10.1[1051]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.10.1[1051]: Info: [lirc] protocol is enabled
Notice: accepted new client on /var/run/lirc/lircd
Info: [lirc] protocol is enabled
info: CALLMETHOD: system_controller system enableLiveLog true
info: CoreCommandRouter::executeOnPlugin: system , enableLiveLog
info: Launching a new LiveLog session
info: touch_display: Setting screensaver timeout to 1800 seconds.
info: [MyVolumio PluginManager] Adding plugin bluetooth to plan premium
info: [MyVolumio PluginManager] Adding plugin multiroom to plan premium
info: [MyVolumio PluginManager] Adding plugin metavolumio to plan premium
info: [MyVolumio PluginManager] Adding plugin manifestui to plan premium
info: [MyVolumio PluginManager] Adding plugin cd_controller to plan premium
info: [MyVolumio PluginManager] Adding plugin smart_inputs to plan premium
info: [MyVolumio PluginManager] Adding plugin hi_res_audio to plan premium
info: [MyVolumio PluginManager] Adding plugin tidal to plan premium
info: [MyVolumio PluginManager] Adding plugin qobuz to plan premium
info: [MyVolumio PluginManager] Adding plugin tidalconnect to plan premium
info: [MyVolumio PluginManager] Adding plugin bluetooth to plan superstar
info: [MyVolumio PluginManager] Adding plugin multiroom to plan superstar
info: [MyVolumio PluginManager] Adding plugin metavolumio to plan superstar
info: [MyVolumio PluginManager] Adding plugin manifestui to plan superstar
info: [MyVolumio PluginManager] Adding plugin cd_controller to plan superstar
info: [MyVolumio PluginManager] Adding plugin smart_inputs to plan superstar
info: [MyVolumio PluginManager] Adding plugin hi_res_audio to plan superstar
info: [MyVolumio PluginManager] Adding plugin tidal to plan superstar
info: [MyVolumio PluginManager] Adding plugin qobuz to plan superstar
info: [MyVolumio PluginManager] Adding plugin tidalconnect to plan superstar
info: [MyVolumio PluginManager] Adding plugin bluetooth to plan virtuoso
info: [MyVolumio PluginManager] Adding plugin manifestui to plan virtuoso
info: [MyVolumio PluginManager] Adding plugin cd_controller to plan virtuoso
info: [MyVolumio PluginManager] Adding plugin tidal to plan virtuoso
info: [MyVolumio PluginManager] Adding plugin qobuz to plan virtuoso
info: [MyVolumio PluginManager] Adding plugin tidalconnect to plan virtuoso
info: Adding plugin bluetooth to MyMusic Plugins
info: Adding plugin multiroom to MyMusic Plugins
info: Adding plugin metavolumio to MyMusic Plugins
info: Adding plugin cd_controller to MyMusic Plugins
info: Adding plugin smart_inputs to MyMusic Plugins
info: Adding plugin tidalconnect to MyMusic Plugins
info: [MyVolumio PluginManager] Loading plugin "my_volumio"...
systemd-fsckd.service: Succeeded.
[Vollibrespot] : Fetching autoplay context uri
[Vollibrespot] : Event: SessionActive { became_active_at: 1652168600226 }
[Vollibrespot] : SessionActive!
[Vollibrespot] : Event: PlaybackStarted { track_id: SpotifyId { id: 215417864280253719101191396546253159956, audio_type: Track } }
[Vollibrespot] : Event: PlaybackLoading { track_id: SpotifyId { id: 215417864280253719101191396546253159956, audio_type: Track } }
[Vollibrespot] : Autoplay uri resolved to <"spotify:playlist:37i9dQZF1DX52ln8eMkne9">
[Vollibrespot] : Resolving uri "spotify:playlist:37i9dQZF1DX52ln8eMkne9"
[Vollibrespot] : Event: GotToken { token: Token { access_token: "BQDSwW8GCn6m6tmZsk-AP3CuH5MYoqRWR0v3UYmX34vGnGe6rgmMPp-UwJBLetL070AlyZIWxtuE-brNmo_mORd6Y06SxJcvc13_1COtIBY7eNE4FpOswYIgMGC3oKU76VgvXssEPMq7jNeEIgIHzRA89BSht5R5Tt6hrlkB", expires_in: 3600, token_type: "Bearer", scope: ["streaming", "user-read-playback-state", "user-modify-playback-state", "user-read-currently-playing", "user-read-private"] } }
[Vollibrespot] : Loading  with Spotify URI 
[Vollibrespot] :  (283377 ms) loaded
[Vollibrespot] : Event: PlaybackStopped { track_id: SpotifyId { id: 215417864280253719101191396546253159956, audio_type: Track } }
[Vollibrespot] : Resolved 50 tracks from <"spotify:playlist:37i9dQZF1DX08n7V52Ynyb">
info: [MyVolumio PluginManager] MyVolumio plugin successfully loaded
info: [MyVolumio PluginManager] Starting plugin system_controller.my_volumio
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: Starting MyVolumio Remote Streaming Endpoints
info: MyVolumio login type: Token
info: [MyVolumio PluginManager] MyVolumio plugin successfully started
info: [MyVolumio PluginManager] Loading plugin "streaming_services"...
info: [MyVolumio PluginManager] Streaming Services plugin successfully loaded
info: [MyVolumio PluginManager] Starting plugin music_service.streaming_services
info: Streaming services startup
info: Starting Streaming Daemon
 volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl restart volumio-streaming-daemon.service
pam_unix(sudo:session): session opened for user root by (uid=0)
Stopping Volumio Streaming Daemon...
volumio-streaming-daemon.service: Main process exited, code=killed, status=15/TERM
volumio-streaming-daemon.service: Succeeded.
Stopped Volumio Streaming Daemon.
Started Volumio Streaming Daemon.
pam_unix(sudo:session): session closed for user root
############################
# Volumio Streaming Daemon #
# Running on port 7777     #
############################
Environment: production
[SpotifyConnect]  A connect session has begun
[SpotifyConnect]  Device palyback is active!
info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 0
[SpotifyConnect] Currently active: webradio
[SpotifyConnect] Stopping currently active service
info: CoreCommandRouter::volumioStop
info: CoreStateMachine::stop
info: CoreStateMachine::setConsumeUpdateService undefined

[SpotifyConnect] Vollibrespot Active
info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 0
[SpotifyConnect] Currently active: webradio
[SpotifyConnect] Setting Volatile state to Volspotconnect2
info: CoreStateMachine::setConsumeUpdateService undefined
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CorePlayQueue::getTrack 0
info: Received update from a service different from the one supposed to be playing music. Skipping notification.Current webradio Received volspotconnect2
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: undefined
[SpotifyConnect] Pushing new state :: true
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
info: CorePlayQueue::getTrack 0
info: Received update from a service different from the one supposed to be playing music. Skipping notification.Current webradio Received volspotconnect2
[SpotifyConnect]  BQDSwW8GCn6m6tmZsk-AP3CuH5MYoqRWR0v3UYmX34vGnGe6rgmMPp-UwJBLetL070AlyZIWxtuE-brNmo_mORd6Y06SxJcvc13_1COtIBY7eNE4FpOswYIgMGC3oKU76VgvXssEPMq7jNeEIgIHzRA89BSht5R5Tt6hrlkB
[SpotifyConnect]  Device palyback is inactive
[SpotifyConnect] Device Session is_active: true
[SpotifyConnect] Setting VLS device_id: 90167bbd65c5a9828e84488fdb7cf55d3f25b8dc
[Vollibrespot] : Event: Play { track_id: SpotifyId { id: 215417864280253719101191396546253159956, audio_type: Track }, position_ms: 1715 }
[SpotifyConnect]  play
[Vollibrespot] : Event: SinkActive
[SpotifyConnect]  Willow Weep For Me
[SpotifyConnect] Pushing metadata
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: undefined
[SpotifyConnect] Pushing new state :: true
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
info: CorePlayQueue::getTrack 0
info: Received update from a service different from the one supposed to be playing music. Skipping notification.Current webradio Received volspotconnect2
[SpotifyConnect]  Sink acquired
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: undefined
[SpotifyConnect] Pushing new state :: true
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MYVOLUMIO SUCCESSFULLY LOGGED IN
info: MYVOLUMIO: Adding device
info: MYVOLUMIO: Evaluating Server
info: MyVolumio status changed
info: Streaming services startup
info: Re-Starting Streaming Daemon
info: Removing browser output: myVolumio user plan is not superstar
info: Removing audio output:
info: Stoppping Tunnel 1
Restarting daemon
Environment: production
 volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl stop sshtunnel.service
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
info: Remote SSH Stopped
info: Setting Geolocation for MyVolumio to eu6
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
Environment: production
info: Fetching Streaming Services browse cache
Environment: production
info: Fetching Streaming Services browse cache
info: Updating MyVolumio device info
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
systemd-hostnamed.service: Succeeded.

info: CALLMETHOD: user_interface now_playing getPluginInfo undefined
info: CoreCommandRouter::executeOnPlugin: now_playing , getPluginInfo
info: Listing playlists
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: CoreCommandRouter::volumioGetVisibleSources
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
info: CoreCommandRouter::volumioGetState
info: CoreCommandRouter::executeOnPlugin: system , getSystemVersion
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
error: MyVolumio Plugin failed to authenticate in a timely fashion
info: Completed starting MyVolumio Plugin
info: BOOT COMPLETED
e[34m [Metrics] e[39m CommandRouter: e[31m 40s 413.57ms e[39m
info: CoreCommandRouter::volumiosetStartupVolume
info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
info: VolumeController:: Setting startup Volume 100
info: VolumeController::SetAlsaVolume100
info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
info: CoreCommandRouter::Close All Modals sent
info: CoreCommandRouter::Close All Modals sent
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: Cannot play startup sound: Error: Command failed: /usr/bin/aplay -D volumio /volumio/app/startup.wav
aplay: main:828: audio open error: Device or resource busy
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
info: CoreCommandRouter::executeOnPlugin: alsa_controller , checkAudioDeviceAvailable
info: CoreCommandRouter::executeOnPlugin: i2s_dacs , getI2sStatus
info: CoreCommandRouter::executeOnPlugin: system , versionChangeDetect
Soliciting pool server 185.45.112.121
Soliciting pool server 108.61.189.74
Soliciting pool server 95.85.21.89
Soliciting pool server 213.136.0.252
Soliciting pool server 172.107.94.157
Soliciting pool server 188.165.11.86
Soliciting pool server 185.216.161.42
Soliciting pool server 45.32.4.67
Soliciting pool server 94.198.159.16
Soliciting pool server 51.15.54.102
Soliciting pool server 2001:9a8:0:5b::4
Soliciting pool server 5.79.75.37
Soliciting pool server 164.92.216.152
Soliciting pool server 94.228.220.14
Soliciting pool server 77.72.144.59
Soliciting pool server 83.98.201.134
receive: Unexpected origin timestamp 0xe6249620.351529e9 does not match aorg 0000000000.00000000 from server@5.79.75.37 xmt 0xe6249648.6ca73528
receive: Unexpected origin timestamp 0xe6249620.351da06e does not match aorg 0000000000.00000000 from server@213.136.0.252 xmt 0xe6249648.6ce0d01f
receive: Unexpected origin timestamp 0xe6249620.351c43b6 does not match aorg 0000000000.00000000 from server@185.216.161.42 xmt 0xe6249648.6d225778
receive: Unexpected origin timestamp 0xe6249620.351aef71 does not match aorg 0000000000.00000000 from server@188.165.11.86 xmt 0xe6249648.6cb3de56
receive: Unexpected origin timestamp 0xe6249620.351f125f does not match aorg 0000000000.00000000 from server@95.85.21.89 xmt 0xe6249648.6e293b6e
receive: Unexpected origin timestamp 0xe6249620.3519875b does not match aorg 0000000000.00000000 from server@45.32.4.67 xmt 0xe6249648.75101862
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
[Vollibrespot] : Loading  with Spotify URI 
[Vollibrespot] :  (234493 ms) loaded
[Vollibrespot] : Event: Next { track_id: SpotifyId { id: 193459095240548287549843987481607300324, audio_type: Track } }
[Vollibrespot] : Event: TrackChanged { old_track_id: SpotifyId { id: 215417864280253719101191396546253159956, audio_type: Track }, track_id: SpotifyId { id: 193459095240548287549843987481607300324, audio_type: Track } }
[SpotifyConnect]  Marie
[SpotifyConnect] Pushing metadata
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: volspotconnect2
[SpotifyConnect] Pushing new state :: true
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState

In pulseaudio I have set the file “daemon.conf” the default fragments from 2 to 4 and for now no more stuttering with mixer type on software, not even with the rotary encoder switched on.

just test it for a while and see if the problem really goes away, but for now no stuttering…finges crossed!

https://wiki.archlinux.org/title/PulseAudio#daemon.conf

default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-fragments = 4
default-fragment-size-msec = 200

it has gotten a bit better after the last adjustments but every now and then a dropout.

even weirder, i installed peppymeter and now the whole underrun problem is gone and no more dropouts.
the solution…install peppymeter :crazy_face:

Yeah, I’m using FusionDSP now and my ALSA underruns also stopped. So basically it seems that anytime another plugin is used that reroutes the audio stream from ALSA (or however it works exactly under the hood), it solves the problem.