Posts: 9
Threads: 2
Joined: Mar 2023
Reputation:
0
Hi,
I'm getting glitches playing music via Spotify. First I thought it might be a network problem, but then I discovered the load was too high:
Code: top - 17:33:21 up 8:35, 1 user, load average: 1.53, 0.97, 0.72
Tasks: 106 total, 1 running, 105 sleeping, 0 stopped, 0 zombie
%Cpu(s): 13.2 us, 86.2 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.6 si, 0.0 st
MiB Mem : 429.8 total, 92.1 free, 82.5 used, 255.2 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 292.8 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3550 root 20 0 19244 8320 6440 S 81.2 1.9 2:47.22 librespot
4075 pi 20 0 8524 2712 2208 R 1.9 0.6 0:00.36 top
1002 root 20 0 7752 1872 1688 S 0.6 0.4 1:18.00 watchdog.+
11 root 20 0 0 0 0 S 0.3 0.0 1:12.73 ksoftirqd+
After some time load goes down and librespot uses about 30% CPU and the sound is ok. But only for a while.
There are no problems playing audio from other sources, this occurs only with Spotify.
I'm using a Raspberry Pi Model B Plus Rev 1.2 with HiFiBerry DIGI+ pro.
Any help greatly appreciated!
Gernot
Posts: 2,131
Threads: 46
Joined: Mar 2020
Reputation:
100
Step 1 is usually to reboot and post the start-up log (moodeutl -l).
Also in this case, your settings from the Spotify Config screen might be relevant.
----------------
Robert
Posts: 9
Threads: 2
Joined: Mar 2023
Reputation:
0
startup log:
Code: pi@moode-whz:~ $ moodeutl -l
20230403 000946 worker: --
20230403 000947 worker: -- Start moOde 8 series
20230403 000947 worker: --
20230403 000947 worker: Successfully daemonized
20230403 000948 worker: Boot config backed up
20230403 122253 worker: File check (OK)
20230403 122306 worker: Session vacuumed
20230403 122306 worker: Session loaded
20230403 122306 worker: Debug logging (OFF)
20230403 122307 worker: --
20230403 122307 worker: -- Audio debug
20230403 122307 worker: --
20230403 122307 worker: ALSA cards: (0:b1 | 1:Headphones | 2:sndrpihifiberry | 3:empty
20230403 122307 worker: MPD config: (2:snd_rpi_hifiberry_digi | mixer:(PCM) | card:2)
20230403 122307 worker: ALSA mixer actual (PCM)
20230403 122308 worker: ALSA PCM volume set to (amixer: Unable to find simple control 'PCM',0)
20230403 122308 worker: --
20230403 122308 worker: -- System
20230403 122308 worker: --
20230403 122314 worker: Host (moode-whz)
20230403 122314 worker: Hardware (Pi-B+ 1.2 512MB)
20230403 122315 worker: moOde (8.3.0 2023-03-14)
20230403 122315 worker: RaspiOS (11.6)
20230403 122315 worker: Kernel (5.15.84+ #1613)
20230403 122315 worker: Procarch (armv6l, 32-bit)
20230403 122315 worker: MPD ver (0.23.12)
20230403 122315 worker: CPU gov (ondemand)
20230403 122315 worker: USB boot (not available)
20230403 122315 worker: File sys (expanded)
20230403 122315 worker: HDMI port (Off)
20230403 122316 worker: Sys LED0 (On)
20230403 122316 worker: Sys LED1 (On)
20230403 122316 worker: --
20230403 122316 worker: -- Network
20230403 122316 worker: --
20230403 122316 worker: eth0 adapter exists
20230403 122316 worker: eth0 address check (Off)
20230403 122316 worker: IP addr (192.168.0.127)
20230403 122317 worker: Netmask (255.255.255.0)
20230403 122317 worker: Gateway (192.168.0.1)
20230403 122317 worker: Pri DNS (192.168.0.1)
20230403 122317 worker: Domain ()
20230403 122317 worker: wlan0 adapter does not exist
20230403 122317 worker: --
20230403 122317 worker: -- Software update
20230403 122317 worker: --
20230403 122317 worker: Automatic check (Off)
20230403 122317 worker: --
20230403 122317 worker: -- Audio config
20230403 122317 worker: --
20230403 122317 worker: MPD conf update skipped (USB device)
20230403 122317 worker: ALSA card number (2)
20230403 122318 worker: MPD audio output (snd_rpi_hifiberry_digi)
20230403 122319 worker: Audio formats (S16_LE, S24_LE)
20230403 122319 worker: ALSA mixer name (PCM)
20230403 122319 worker: MPD mixer type (fixed 0dB)
20230403 122320 worker: Hdwr volume controller not detected
20230403 122320 worker: ALSA output mode (Direct: hw)
20230403 122321 worker: ALSA loopback (Off)
20230403 122321 worker: Reset renderer active flags
20230403 122321 worker: CamillaDSP (off)
20230403 122321 worker: CamillaDSP volume sync (off)
20230403 122321 worker: --
20230403 122321 worker: -- File sharing
20230403 122321 worker: --
20230403 122321 worker: SMB file sharing (Off)
20230403 122321 worker: NFS file sharing (Off)
20230403 122321 worker: --
20230403 122321 worker: -- MPD startup
20230403 122321 worker: --
20230403 122326 worker: MPD started
20230403 122326 worker: MPD accepting connections
20230403 122327 worker: MPD output 1 ALSA Default (On)
20230403 122327 worker: MPD output 2 ALSA Bluetooth (Off)
20230403 122327 worker: MPD output 3 HTTP Server (Off)
20230403 122327 worker: MPD crossfade (off)
20230403 122327 worker: MPD ignore CUE files (yes)
20230403 122327 worker: --
20230403 122327 worker: -- Music sources
20230403 122327 worker: --
20230403 122327 worker: USB sources
20230403 122328 worker: No drives found
20230403 122328 worker: NAS sources
20230403 122328 worker: None configured
20230403 122328 worker: --
20230403 122328 worker: -- Feature availability
20230403 122328 worker: --
20230403 122328 worker: Input select (available)
20230403 122328 worker: Input (MPD)
20230403 122329 worker: Output (snd_rpi_hifiberry_digi)
20230403 122329 worker: Bluetooth (available)
20230403 122330 worker: AirPlay renderer (available)
20230403 122330 worker: Spotify renderer (available: started)
20230403 122330 worker: Squeezelite (available)
20230403 122330 worker: RoonBridge renderer (not installed)
20230403 122330 worker: Multiroom sender (available)
20230403 122330 worker: Multiroom receiver (available)
20230403 122330 worker: UPnP renderer (available)
20230403 122330 worker: DLNA server (available)
20230403 122330 worker: GPIO button handler (available)
20230403 122330 worker: Stream recorder (available: not installed)
20230403 122330 worker: HTTPS-Only mode (n/a)
20230403 122330 worker: --
20230403 122330 worker: -- Other
20230403 122330 worker: --
20230403 122330 worker: USB volume knob (Off)
20230403 122330 worker: USB auto-mounter (udisks-glue)
20230403 122330 worker: Saved MPD vol level (0)
20230403 122330 worker: Preamp volume level (0)
20230403 122331 worker: MPD volume level (0) restored
20230403 122331 worker: ALSA volume level (None)
20230403 122331 worker: Auto-play (Off)
20230403 122331 worker: LocalUI (Off)
20230403 122331 worker: Automatic CoverView (Off)
20230403 122331 worker: On-screen keyboard (Off)
20230403 122331 worker: Library scope (all)
20230403 122331 worker: View reset to playback
20230403 122331 worker: Maintenance interval (360 minutes)
20230403 122331 worker: Screen saver activation (Never)
20230403 122331 worker: Session permissions (OK)
20230403 122332 worker: Mount monitor (Off)
20230403 122333 worker: Watchdog started
20230403 122333 worker: Ready
I tried different Spotify settings without real improvement.
Everything is default, except for bitrate. The default setting (160) seems to improve a bit, but not that much. And I don't want to reduce bitrate, that is not an acceptable solution.
Code: Audio format
Bitrate 320
Format S16(Default)
Dithering Automatic (Default)
Volume control
Volume curve Logarithmic (Default)
Volume range 100
Initial volume 100
Volume normalization
Normalize volume No
Method Dynamic (Default)
Gain type Automatic (Default)
Pregain 0
Threshold -2
Attack 5
Release 100
Knee 1
Other options
Autoplay No
Greetings,
Gernot
Posts: 14,588
Threads: 335
Joined: Mar 2018
Reputation:
599
(04-03-2023, 10:37 AM)gntng Wrote: startup log:
Code: pi@moode-whz:~ $ moodeutl -l
20230403 000946 worker: --
20230403 000947 worker: -- Start moOde 8 series
20230403 000947 worker: --
20230403 000947 worker: Successfully daemonized
20230403 000948 worker: Boot config backed up
20230403 122253 worker: File check (OK)
20230403 122306 worker: Session vacuumed
20230403 122306 worker: Session loaded
20230403 122306 worker: Debug logging (OFF)
20230403 122307 worker: --
20230403 122307 worker: -- Audio debug
20230403 122307 worker: --
20230403 122307 worker: ALSA cards: (0:b1 | 1:Headphones | 2:sndrpihifiberry | 3:empty
20230403 122307 worker: MPD config: (2:snd_rpi_hifiberry_digi | mixer:(PCM) | card:2)
20230403 122307 worker: ALSA mixer actual (PCM)
20230403 122308 worker: ALSA PCM volume set to (amixer: Unable to find simple control 'PCM',0)
20230403 122308 worker: --
20230403 122308 worker: -- System
20230403 122308 worker: --
20230403 122314 worker: Host (moode-whz)
20230403 122314 worker: Hardware (Pi-B+ 1.2 512MB)
20230403 122315 worker: moOde (8.3.0 2023-03-14)
20230403 122315 worker: RaspiOS (11.6)
20230403 122315 worker: Kernel (5.15.84+ #1613)
20230403 122315 worker: Procarch (armv6l, 32-bit)
20230403 122315 worker: MPD ver (0.23.12)
20230403 122315 worker: CPU gov (ondemand)
20230403 122315 worker: USB boot (not available)
20230403 122315 worker: File sys (expanded)
20230403 122315 worker: HDMI port (Off)
20230403 122316 worker: Sys LED0 (On)
20230403 122316 worker: Sys LED1 (On)
20230403 122316 worker: --
20230403 122316 worker: -- Network
20230403 122316 worker: --
20230403 122316 worker: eth0 adapter exists
20230403 122316 worker: eth0 address check (Off)
20230403 122316 worker: IP addr (192.168.0.127)
20230403 122317 worker: Netmask (255.255.255.0)
20230403 122317 worker: Gateway (192.168.0.1)
20230403 122317 worker: Pri DNS (192.168.0.1)
20230403 122317 worker: Domain ()
20230403 122317 worker: wlan0 adapter does not exist
20230403 122317 worker: --
20230403 122317 worker: -- Software update
20230403 122317 worker: --
20230403 122317 worker: Automatic check (Off)
20230403 122317 worker: --
20230403 122317 worker: -- Audio config
20230403 122317 worker: --
20230403 122317 worker: MPD conf update skipped (USB device)
20230403 122317 worker: ALSA card number (2)
20230403 122318 worker: MPD audio output (snd_rpi_hifiberry_digi)
20230403 122319 worker: Audio formats (S16_LE, S24_LE)
20230403 122319 worker: ALSA mixer name (PCM)
20230403 122319 worker: MPD mixer type (fixed 0dB)
20230403 122320 worker: Hdwr volume controller not detected
20230403 122320 worker: ALSA output mode (Direct: hw)
20230403 122321 worker: ALSA loopback (Off)
20230403 122321 worker: Reset renderer active flags
20230403 122321 worker: CamillaDSP (off)
20230403 122321 worker: CamillaDSP volume sync (off)
20230403 122321 worker: --
20230403 122321 worker: -- File sharing
20230403 122321 worker: --
20230403 122321 worker: SMB file sharing (Off)
20230403 122321 worker: NFS file sharing (Off)
20230403 122321 worker: --
20230403 122321 worker: -- MPD startup
20230403 122321 worker: --
20230403 122326 worker: MPD started
20230403 122326 worker: MPD accepting connections
20230403 122327 worker: MPD output 1 ALSA Default (On)
20230403 122327 worker: MPD output 2 ALSA Bluetooth (Off)
20230403 122327 worker: MPD output 3 HTTP Server (Off)
20230403 122327 worker: MPD crossfade (off)
20230403 122327 worker: MPD ignore CUE files (yes)
20230403 122327 worker: --
20230403 122327 worker: -- Music sources
20230403 122327 worker: --
20230403 122327 worker: USB sources
20230403 122328 worker: No drives found
20230403 122328 worker: NAS sources
20230403 122328 worker: None configured
20230403 122328 worker: --
20230403 122328 worker: -- Feature availability
20230403 122328 worker: --
20230403 122328 worker: Input select (available)
20230403 122328 worker: Input (MPD)
20230403 122329 worker: Output (snd_rpi_hifiberry_digi)
20230403 122329 worker: Bluetooth (available)
20230403 122330 worker: AirPlay renderer (available)
20230403 122330 worker: Spotify renderer (available: started)
20230403 122330 worker: Squeezelite (available)
20230403 122330 worker: RoonBridge renderer (not installed)
20230403 122330 worker: Multiroom sender (available)
20230403 122330 worker: Multiroom receiver (available)
20230403 122330 worker: UPnP renderer (available)
20230403 122330 worker: DLNA server (available)
20230403 122330 worker: GPIO button handler (available)
20230403 122330 worker: Stream recorder (available: not installed)
20230403 122330 worker: HTTPS-Only mode (n/a)
20230403 122330 worker: --
20230403 122330 worker: -- Other
20230403 122330 worker: --
20230403 122330 worker: USB volume knob (Off)
20230403 122330 worker: USB auto-mounter (udisks-glue)
20230403 122330 worker: Saved MPD vol level (0)
20230403 122330 worker: Preamp volume level (0)
20230403 122331 worker: MPD volume level (0) restored
20230403 122331 worker: ALSA volume level (None)
20230403 122331 worker: Auto-play (Off)
20230403 122331 worker: LocalUI (Off)
20230403 122331 worker: Automatic CoverView (Off)
20230403 122331 worker: On-screen keyboard (Off)
20230403 122331 worker: Library scope (all)
20230403 122331 worker: View reset to playback
20230403 122331 worker: Maintenance interval (360 minutes)
20230403 122331 worker: Screen saver activation (Never)
20230403 122331 worker: Session permissions (OK)
20230403 122332 worker: Mount monitor (Off)
20230403 122333 worker: Watchdog started
20230403 122333 worker: Ready
I tried different Spotify settings without real improvement.
Everything is default, except for bitrate. The default setting (160) seems to improve a bit, but not that much. And I don't want to reduce bitrate, that is not an acceptable solution.
Code: Audio format
Bitrate 320
Format S16(Default)
Dithering Automatic (Default)
Volume control
Volume curve Logarithmic (Default)
Volume range 100
Initial volume 100
Volume normalization
Normalize volume No
Method Dynamic (Default)
Gain type Automatic (Default)
Pregain 0
Threshold -2
Attack 5
Release 100
Knee 1
Other options
Autoplay No
Greetings,
Gernot
The line below in the startup log output is odd because an I2S audio device should always be assigned by Linux to ALSA card 0 and in this case it's assigned to card 2. In moOde cards 2 or 3 are considered to be used by USB audio devices.
Code: 20230403 122307 worker: ALSA cards: (0:b1 | 1:Headphones | 2:sndrpihifiberry | 3:empty
This will cause some breakage. For example in the log entry below MPD config is not updated since moOde treats the device assigned to card 2 as a USB audio device.
Code: 20230403 122317 worker: MPD conf update skipped (USB device)
20230403 122317 worker: ALSA card number (2)
Posts: 9
Threads: 2
Joined: Mar 2023
Reputation:
0
(04-03-2023, 11:53 AM)Tim Curtis Wrote: The line below in the startup log output is odd because an I2S audio device should always be assigned by Linux to ALSA card 0 and in this case it's assigned to card 2. In moOde cards 2 or 3 are considered to be used by USB audio devices. Thank you. I just have absolutely no clue how to fix this.
Greetings,
Gernot
Posts: 14,588
Threads: 335
Joined: Mar 2018
Reputation:
599
It's not something that can be "fixed". In stock moOde, Linux will assign ALSA card 0 to an I2S DAC.
Posts: 9
Threads: 2
Joined: Mar 2023
Reputation:
0
Ok, I think I have fixed this issue:
Code: pi@moode-whz:~ $ moodeutl -l
20230403 230251 worker: --
20230403 230252 worker: -- Start moOde 8 series
20230403 230252 worker: --
20230403 230252 worker: Successfully daemonized
20230403 230253 worker: Boot config backed up
20230403 230305 worker: File check (OK)
20230403 230334 worker: Session vacuumed
20230403 230334 worker: Session loaded
20230403 230334 worker: Debug logging (OFF)
20230403 230334 worker: --
20230403 230334 worker: -- Audio debug
20230403 230334 worker: --
20230403 230334 worker: ALSA cards: (0:sndrpihifiberry | 1:empty | 2:empty | 3:empty
20230403 230334 worker: MPD config: (0:HiFiBerry Digi+ Pro | mixer:(PCM) | card:0)
20230403 230334 worker: ALSA mixer actual (none)
20230403 230335 worker: ALSA volume (none)
20230403 230335 worker: --
20230403 230335 worker: -- System
20230403 230335 worker: --
20230403 230348 worker: Host (moode-whz)
20230403 230348 worker: Hardware (Pi-B+ 1.2 512MB)
20230403 230349 worker: moOde (8.3.0 2023-03-14)
20230403 230349 worker: RaspiOS (11.6)
20230403 230349 worker: Kernel (5.15.84+ #1613)
20230403 230349 worker: Procarch (armv6l, 32-bit)
20230403 230349 worker: MPD ver (0.23.12)
20230403 230349 worker: CPU gov (ondemand)
20230403 230349 worker: USB boot (not available)
20230403 230349 worker: File sys (expanded)
20230403 230350 worker: HDMI port (Off)
20230403 230351 worker: Sys LED0 (On)
20230403 230351 worker: Sys LED1 (On)
20230403 230351 worker: --
20230403 230351 worker: -- Network
20230403 230351 worker: --
20230403 230352 worker: eth0 adapter exists
20230403 230352 worker: eth0 address check (Off)
20230403 230352 worker: IP addr (192.168.0.127)
20230403 230353 worker: Netmask (255.255.255.0)
20230403 230353 worker: Gateway (192.168.0.1)
20230403 230354 worker: Pri DNS (192.168.0.1)
20230403 230354 worker: Domain ()
20230403 230354 worker: wlan0 adapter does not exist
20230403 230354 worker: --
20230403 230354 worker: -- Software update
20230403 230354 worker: --
20230403 230354 worker: Automatic check (Off)
20230403 230354 worker: --
20230403 230354 worker: -- Audio config
20230403 230354 worker: --
20230403 230357 worker: MPD conf updated
20230403 230357 worker: ALSA card number (0)
20230403 230357 worker: MPD audio output (HiFiBerry Digi+ Pro)
20230403 230358 worker: Audio formats (S16_LE, S24_LE)
20230403 230358 worker: ALSA mixer name (none)
20230403 230358 worker: MPD mixer type (fixed 0dB)
20230403 230358 worker: Hdwr volume controller not detected
20230403 230359 worker: ALSA output mode (Direct: hw)
20230403 230359 worker: ALSA loopback (Off)
20230403 230359 worker: Reset renderer active flags
20230403 230359 worker: CamillaDSP (off)
20230403 230359 worker: CamillaDSP volume sync (off)
20230403 230359 worker: --
20230403 230359 worker: -- File sharing
20230403 230359 worker: --
20230403 230359 worker: SMB file sharing (Off)
20230403 230359 worker: NFS file sharing (Off)
20230403 230359 worker: --
20230403 230359 worker: -- MPD startup
20230403 230359 worker: --
20230403 230403 worker: MPD started
20230403 230403 worker: MPD accepting connections
20230403 230403 worker: MPD output 1 ALSA Default (On)
20230403 230403 worker: MPD output 2 ALSA Bluetooth (Off)
20230403 230403 worker: MPD output 3 HTTP Server (Off)
20230403 230403 worker: MPD crossfade (off)
20230403 230403 worker: MPD ignore CUE files (yes)
20230403 230403 worker: --
20230403 230403 worker: -- Music sources
20230403 230403 worker: --
20230403 230403 worker: USB sources
20230403 230403 worker: No drives found
20230403 230404 worker: NAS sources
20230403 230404 worker: None configured
20230403 230404 worker: --
20230403 230404 worker: -- Feature availability
20230403 230404 worker: --
20230403 230404 worker: Input select (available)
20230403 230404 worker: Input (MPD)
20230403 230404 worker: Output (HiFiBerry Digi+ Pro)
20230403 230404 worker: Bluetooth (available)
20230403 230405 worker: AirPlay renderer (available)
20230403 230405 worker: Spotify renderer (available: started)
20230403 230405 worker: Squeezelite (available)
20230403 230405 worker: RoonBridge renderer (not installed)
20230403 230405 worker: Multiroom sender (available)
20230403 230405 worker: Multiroom receiver (available)
20230403 230405 worker: UPnP renderer (available)
20230403 230405 worker: DLNA server (available)
20230403 230405 worker: GPIO button handler (available)
20230403 230405 worker: Stream recorder (available: not installed)
20230403 230405 worker: HTTPS-Only mode (n/a)
20230403 230405 worker: --
20230403 230405 worker: -- Other
20230403 230405 worker: --
20230403 230405 worker: USB volume knob (Off)
20230403 230405 worker: USB auto-mounter (udisks-glue)
20230403 230405 worker: Saved MPD vol level (0)
20230403 230405 worker: Preamp volume level (0)
20230403 230406 worker: MPD volume level (0) restored
20230403 230406 worker: ALSA volume level (None)
20230403 230406 worker: Auto-play (Off)
20230403 230406 worker: LocalUI (Off)
20230403 230406 worker: Automatic CoverView (Off)
20230403 230406 worker: On-screen keyboard (Off)
20230403 230406 worker: Library scope (all)
20230403 230406 worker: View reset to playback
20230403 230406 worker: Maintenance interval (360 minutes)
20230403 230406 worker: Screen saver activation (Never)
20230403 230406 worker: Session permissions (OK)
20230403 230406 worker: Mount monitor (Off)
20230403 230407 worker: Watchdog started
20230403 230407 worker: Ready
20230403 231355 worker: Job spotifysvc
20230403 231432 worker: Job spotifysvc
20230403 234150 worker: Job spotifysvc
But unfortunately this was no help regarding the original problem.
Spotify still has the same issues: high load and hickups in sound output after some minutes playing.
Regards,
Gernot
|