Thank you for your donation!


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


Solved: openMpdSock() failed on 64 Bit operation
#1
Hello to all


I would like to share my experience and need you help about one issue i can't solve myself.
I'm a begginer in rasp pi and linux so please forgive me about it.
My rasp pi is a 4B model with 4 Go and i have a PI2AES Hat with the Hifiberry Digi+ pro driver (as PI2AES suggested).
My files are on a NAS with Samba.

The issue is since in updated to 8.2.1 i have a "openMpdSock() failed" problem very often.
I can use moode several days before it appears.
But once it occurs, the library is not detected anymore and i can't play anything.
The only fix i found on internet is to get back to a 32 bit version but i can't as it's the new Moode 64 bits version.

I like really like the sound improvement in 64 bit operation in my system.
In the 7 or 6 version i had before, the fix i found is to get back to 32 bit in the system options, regenerate / update library.
Then moode shows my music library again and the message "openMpdSock() failed" stops popping.
After this, i can go back in 64 bits and play and enjoy music until the next time ...
As far as i remember in the 7.2.1 in didn't have the problem or very rarely.

One more thing: i cant upload a backup file as i can't load the .ini file.
I'm shurely missing something about it ...

Thanks you very much for your help


Edit: i did some tweak on my moode like Sox custom receip, Archimago's CRAAP settings and isolcpus 2,3 with chrt -a -f options so the 2 isolated cpus can retrieve the scheduling attributes and work together for Moode.
This really improves the sound quality for my ears, i will post later another thread to share it to you.
I maybe need to run Moode 8.2.1 64 Bits without all of this but a s far as i remember, it also have this problem with no tweaks at all.


   
   
   
Reply
#2
The symptoms suggest a bad SDCard. Try a different one.

Also reboot and post the startup log and I'll have a look.

Code:
moodeutl -l

If you are not familiar with the SSH terminal (where the above commend is to be entered) then open System config, turn on SSH term server and then OPEN it. Userid = pi and password = moodeaudio
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hello Tim

I already tried another SD card - same problem
And i already tried to reboot in SSH - same problem
Reply
#4
Linux: 11.5 | 5.15.61-v8+ #1579 | aarch64 (64-bit)
Raspi: Pi-4B 1.2 4GB
Audio: HiFiBerry Digi+ Pro

____ __ ___
__ _ ___ / __ \___/ /__ ( _ )
/ ' \/ _ \/ /_/ / _ / -_) / _ |
/_/_/_/\___/\____/\_,_/\__/ \___/

moOde audio player
Release 8.2.1 2022-10-07
© 2014 Tim Curtis


The programs included with moOde are free software; the
exact distribution terms for each program are described
in the individual files in /usr/share/doc/*/copyright or
in the moOde source files. moOde comes with absolutely
no warranties either expressed or implied, or any other
such guarantees.

To set a new password for the user 'pi' type 'passwd'.

Last login: Sat Oct 22 14:32:25 2022 from 192.168.1.217
pi@moode:~ $ moodeutl -l
20221022 143247 worker: --
20221022 143247 worker: -- Start moOde 8 series
20221022 143247 worker: --
20221022 143247 worker: Successfully daemonized
20221022 143249 worker: File check (OK)
20221022 143250 worker: Session vacuumed
20221022 143250 worker: Session loaded
20221022 143250 worker: Debug logging (OFF)
20221022 143250 worker: --
20221022 143250 worker: -- Audio debug
20221022 143250 worker: --
20221022 143250 worker: ALSA cards: (0Confusedndrpihifiberry | 1:empty | 2:empty | 3:empty
20221022 143250 worker: MPD config: (0:HiFiBerry Digi+ Pro | mixerSadnone) | card:0)
20221022 143250 worker: ALSA mixer actual (none)
20221022 143250 worker: ALSA volume (none)
20221022 143250 worker: --
20221022 143250 worker: -- System
20221022 143250 worker: --
20221022 143251 worker: Host (moode)
20221022 143251 worker: moOde (8.2.1 2022-10-07)
20221022 143251 worker: RaspiOS (11.5)
20221022 143251 worker: Kernel (5.15.61-v8+ #1579)
20221022 143251 worker: Platform (Pi-4B 1.2 4GB)
20221022 143251 worker: ARM arch (aarch64, 64-bit)
20221022 143251 worker: MPD ver (0.23.5)
20221022 143251 worker: CPU gov (ondemand)
20221022 143251 worker: USB boot (enabled)
20221022 143251 worker: File sys (expanded)
20221022 143251 worker: HDMI port (Off)
20221022 143251 worker: Sys LED0 (On)
20221022 143251 worker: Sys LED1 (On)
20221022 143251 worker: --
20221022 143251 worker: -- Network
20221022 143251 worker: --
20221022 143251 worker: eth0 adapter exists
20221022 143251 worker: eth0 check for address (No)
20221022 143252 worker: IP addr (192.168.1.166)
20221022 143252 worker: Netmask (255.255.255.0)
20221022 143252 worker: Gateway (192.168.1.1)
20221022 143252 worker: Pri DNS (192.168.1.1)
20221022 143252 worker: Domain ()
20221022 143252 worker: wlan0 adapter does not exist
20221022 143252 worker: apd0 router mode (Off)
20221022 143252 worker: --
20221022 143252 worker: -- Software update
20221022 143252 worker: --
20221022 143252 worker: Automatic check (Off)
20221022 143252 worker: --
20221022 143252 worker: -- Audio config
20221022 143252 worker: --
20221022 143252 worker: MPD conf updated
20221022 143252 worker: ALSA card number (0)
20221022 143252 worker: MPD audio output (HiFiBerry Digi+ Pro)
20221022 143252 worker: Audio formats (S16_LE, S24_LE)
20221022 143252 worker: ALSA mixer name (none)
20221022 143252 worker: MPD mixer type (fixed 0dB)
20221022 143252 worker: Hdwr volume controller not detected
20221022 143252 worker: ALSA output mode (Direct: hw)
20221022 143252 worker: ALSA loopback (Off)
20221022 143252 worker: Reset renderer active flags
20221022 143252 worker: CamillaDSP (off)
20221022 143252 worker: --
20221022 143252 worker: -- File sharing
20221022 143252 worker: --
20221022 143252 worker: SMB file sharing (Off)
20221022 143252 worker: NFS file sharing (Off)
20221022 143252 worker: --
20221022 143252 worker: -- MPD startup
20221022 143252 worker: --
20221022 143252 worker: MPD started
20221022 143255 worker: MPD connection refused
20221022 143255 worker: MPD crossfade (off)
20221022 143255 worker: MPD ignore CUE files (no)
20221022 143255 worker: --
20221022 143255 worker: -- Music sources
20221022 143255 worker: --
20221022 143255 worker: USB sources (none attached)
20221022 143257 worker: NAS sources (mountall initiated)
20221022 143257 worker: --
20221022 143257 worker: -- Feature availability
20221022 143257 worker: --
20221022 143257 worker: Source select (available)
20221022 143257 worker: Source select (source: MPD)
20221022 143257 worker: Source select (output: HiFiBerry Digi+ Pro)
20221022 143257 worker: Bluetooth (available)
20221022 143257 worker: Airplay renderer (available)
20221022 143257 worker: Spotify renderer (available: started)
20221022 143257 worker: Squeezelite (available)
20221022 143257 worker: RoonBridge renderer (not installed)
20221022 143257 worker: Multiroom sender (available)
20221022 143257 worker: Multiroom receiver (available)
20221022 143257 worker: UPnP renderer (available)
20221022 143257 worker: DLNA server (available)
20221022 143257 worker: GPIO button handler (available)
20221022 143257 worker: Stream recorder (n/a)
20221022 143257 worker: --
20221022 143257 worker: -- Other
20221022 143257 worker: --
20221022 143257 worker: USB volume knob (Off)
20221022 143257 worker: Shellinabox SSH started
20221022 143257 worker: USB auto-mounter (udisks-glue)
20221022 143257 worker: Saved MPD vol level (0)
20221022 143257 worker: Preamp volume level (0)
20221022 143257 worker: MPD volume level (0) restored
20221022 143257 worker: ALSA volume level (None)
20221022 143257 worker: Auto-play (Off)
20221022 143257 worker: CoverView toggle (-off)
20221022 143257 worker: Library scope (all)
20221022 143257 worker: Maintenance interval (360 minutes)
20221022 143257 worker: Screen saver activation (Never)
20221022 143257 worker: Session permissions (OK)
20221022 143258 worker: Mount monitor started
20221022 143258 worker: Watchdog started
20221022 143258 worker: Ready
20221022 143258 watchdog: Error: MPD restarted (check syslog for messages)
pi@moode:~ $
Reply
#5
It seems i found my problem after deleting all the tweaks i've done and reintroduced them one by one:

CRAAP setting - OK
SoX custom recipe - OK
isolcpu - NOK

what i was doing:

in /boot/cmdline.txt
isolcpus=2,3

in /lib/systemd/system/mpd.service
ExecStart=/usr/bin/taskset -c 2,3 chrt -a -f /usr/local/bin/mpd --no-daemon $MPDCONF

-a and -f options were found in:
https://www.man7.org/linux/man-pages/man1/chrt.1.html

It seemed to make working the 2 isolated CPUs on MPD with fifo scheduling (seen with htop)
But then it tends to bug with time ...

the "correct way" is:
isolcpus=2,3
ExecStart=/usr/bin/taskset -c 2,3 /usr/bin/mpd --no-daemon $MPDCONF

"chrt -a -f" deleted and "/usr/local/bin/mpd --no-daemon $MPDCONF" changed in "/usr/bin/mpd --no-daemon $MPDCONF"

Don't know if it's the real correct way, but "openMpdSock() failed" is gone after a restart and MPD seems to be isolated on CPU 2
But the problem is that only CPU 2 is doing MPD as "isolcpu 2,3" and "taskset c 2,3" disables the scheduling policies on the isolated CPUs.
So CPU 3 is idle...

I will try to find another solution and post it if it works well.


Another thing in moode 6 and 7 i used to find in /lib/systemd/system/mpd.service the CPUSchedulingPolicy, CPUSchedulingPriority and Nice parameters but the lines are gone...

Does someone knows where to find them ?

Thanks for your input
Reply
#6
(10-22-2022, 05:16 PM)jan69 Wrote: It seems i found my problem after deleting all the tweaks i've done and reintroduced them one by one:

(...)

Mmm,

you state you're a beginner in Linux, then you suddenly find yourself tackling with nonetheless that the cpu scheduler...


Cheers, Al.
Reply
#7
@jan69

It's been a decade since I last thought about isolating cpus and creating cpusets and such things (in the context of real-time CNC systems) so I may be off-base here, but it feels like you're trying to work at cross purposes. Isn't it the case that isolating MPD to a cpu means making sure it isn't interrupted by the Linux scheduler? Wouldn't this mean any CPUSchedulingPolicy or nice settings would be irrelevant?

Regards,
Kent
Reply
#8
(10-22-2022, 05:46 PM)Nutul Wrote:
(10-22-2022, 05:16 PM)jan69 Wrote: It seems i found my problem after deleting all the tweaks i've done and reintroduced them one by one:

(...)

Mmm,

you state you're a beginner in Linux, then you suddenly find yourself tackling with nonetheless that the cpu scheduler...


Cheers, Al.

Yes, i still think i'm a begginer ...
I still feel that i have so much more to learn about it.
And that's why i'm here ...

Linux and computer is not my everyday occupation.
I'm just curious, love audio and tweak my system in everyway i can.

Regards, jb
Reply
#9
(10-22-2022, 05:52 PM)TheOldPresbyope Wrote: @jan69

It's been a decade since I last thought about isolating cpus and creating cpusets and such things (in the context of real-time CNC systems) so I may be off-base here, but it feels like you're trying to work at cross purposes. Isn't it the case that isolating MPD to a cpu means making sure it isn't interrupted by the Linux scheduler? Wouldn't this mean any CPUSchedulingPolicy or nice settings would be irrelevant?

Regards,
Kent

To be honest i don't know ...
It seems that it has a positive impact on my system on last Moode versions.
I might be wrong, but i like to experiment and understand.

One thing i learnt in my system optimisation journey is:
Don't follow the dogmas, experiment by yourself.
Sometimes what is written in books is not what it will end in the reality.
Don't know why, but it's like that.

Regards, jb
Reply
#10
moOde is already "optimized" and needs no further modifications to play absolutely fantastic quality audio but if tweaking and modifying software are interesting to you then first read the documentation from the software engineer that maintains MPD.
https://mpd.readthedocs.io/en/stable/use...scheduling

And also some interesting and informative dialog
https://github.com/MusicPlayerDaemon/MPD...sions/1455
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: