Debian 9 Stretch

A DIY digital music streamer with exceptional performance

Moderator: Staff

fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

Yes, I'm using Bubble upnp and kazoo on Android, same results.
tokenbrit
Very active member
Very active member
Posts: 2038
Joined: 2012-03-22 19:47
Location: New England

Re: Debian 9 Stretch

Post by tokenbrit »

Hi Sopper, can you help, again, please?
Prompted by recent discussions about the difference in stopping processes as opposed to changing process priority, I remembered the Sopper helpful step-by-step HAKAI install & setup guide.

In your original instructions you created user usbaudio, and installed mpd...
Sopper wrote: 2018-12-17 11:18 Debian 9 Stretch
.. get the right debian install version; i recommend the netinstall version...
.. Boot your system using the installation medium that you prepared and then proceed as follows
...
◾After the "root" is set up a "Normal User Account" is created. In this example we use the user "usbaudio"
...

So, now you have Debian installed...
(install alsa-utils, alsa-tools, mpd (& upmpdcli))
.. you need a proper mpd.conf file.
(music_directory "/home/usbaudio/share/music")
...
From mpd documentation, the music player daemon runs as user id at initialization - usbaudio, as above - and seems to configure itself to autostart...

In a later step, you mention creating a new user - audio - and setting the priority to audio:
Sopper wrote: 2018-12-17 11:19 Setting priority to audio
.. create a new usergroup "audio" in your debian:
.. Now set priority for this user...
I'm not sure whether this was specifically related to using a real-time kernel, but I couldn't see how this would have any effect on mpd (or upmpdcli). I know you've since installed a different kernel but, for the audio user priority to work, doesn't the user need to match the one in the mpd configuration? From your example(s), couldn't you just have elevated the priority of usbaudio?

Please don't take this as any criticism - your guides have been valuable. I know the instructions were written in stages as experience was gained, so I wanted to make sure I understood, and checked possible inconsistencies to help anyone coming across these instructions for reference.

On a related note, upmpdcli & mpd seem to autostart reliably and my HAKAI reboots as headless without the need to login with username and password. Therefore I did not bother to install mingetty - I just SSH in & out as needed. I trust there's no reason to install mingetty other than to solve troublesome (re)booting issues, if experienced?
Sopper
Very active member
Very active member
Posts: 430
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper »

Mpd will run as current user if no user is present in the mpd.conf file.
The mixup is caused due to taking 2 different pieces from guides and put together.
I recommend to put # for user and group in mpd.conf, so mpd will always run as current user.

I don’t think priority settings impact performance, but one can try.
It only runs mpd and upmpdcli, nothing more... so all priority already goes to music streaming.

The impact of most tweaks is really minor or none, but combined they can lead to big improvement.
The variables are just too many to test though and I have lost track of all the modifications I made.
I’m even unsure if a RT-kernel helps...
KÄLLA > Sagatun Mono 1.7 > Tundra Mono 3.0 > Graham LS8/1F
Cables: Trivium Audio Cables
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version. Why that's different to my previous thoughts are I hadn't realized the mpd.conf file didn't have an audio_buffer setting, so it was using the default 4096. Once I put it to 256, wow. I've also installed an RT kernel, which I think helps, but doesn't do any harm.

On MPD 0.20.xx compressed files stutter unless the buffer is about 2048. But MPD 0.21.xx doesn't stutter at 256. I might have to configure minumserver to transcode compressed to wav.
Sopper
Very active member
Very active member
Posts: 430
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper »

fatjulio wrote: 2019-01-18 07:30 After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version.
0.20.21 serious? Or typo?
KÄLLA > Sagatun Mono 1.7 > Tundra Mono 3.0 > Graham LS8/1F
Cables: Trivium Audio Cables
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

Yes, 0.20.21
Maybe it suits my system more than the later versions. It sounds more live and emotional to me.
Paaf
Very active member
Very active member
Posts: 254
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf »

@fatjulio
Do you use "apt-get" to install 0.21.3? Where did you find it?

Also, thanks for that about the audio_buffer! After you wrote that, I realized that a script had overwritten my mpd.conf and that I was back on the default setting.

(I remember that I did comment here that the apt-get installed MPD was not as good as the home-built one. Of course it was different, it used different settings!)

I am now comparing 4096 and 256 back and forth.
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

I used the build it yourself method originally listed. I think the audio buffer size has a greater impact on the 0.20.xx versions.
Paaf
Very active member
Very active member
Posts: 254
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf »

Thanks.

I currently use MPD 0.20.23.
Setting 256 is more tuneful than 4096 for regular FLAC!

However, for 24/88 FLAC, the stuttering is horrible, tunefulness zero.
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

Do you have minimserver? You could specify to convert flac above 16/44.1 to wav or flac 16/44.1. That might still let you use 256.
Paaf
Very active member
Very active member
Posts: 254
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf »

Using MiniDLNA. That's a good idea - and I think one could also probably convert it in MPD.
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

I think mpd is already doing the converting, which is why it's stuttering. It has to get down to 16/44.1 to be output
Sopper
Very active member
Very active member
Posts: 430
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper »

fatjulio wrote: 2019-01-19 04:05 I think mpd is already doing the converting, which is why it's stuttering. It has to get down to 16/44.1 to be output
I don’t think the stuttering is caused by mpd downsampling, because all ESI users should run into the same stuttering and that ain’t the case.
KÄLLA > Sagatun Mono 1.7 > Tundra Mono 3.0 > Graham LS8/1F
Cables: Trivium Audio Cables
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

Sopper wrote: 2019-01-18 08:54
fatjulio wrote: 2019-01-18 07:30 After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version.
0.20.21 serious? Or typo?
I take that back. 0.21.xx is better. I was distracted by some "sound" qualities, not musicality.
Sopper
Very active member
Very active member
Posts: 430
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper »

fatjulio wrote: 2019-01-26 00:16
Sopper wrote: 2019-01-18 08:54
fatjulio wrote: 2019-01-18 07:30 After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version.
0.20.21 serious? Or typo?
I take that back. 0.21.xx is better. I was distracted by some "sound" qualities, not musicality.
Thanks for the feedback and confirmation.
KÄLLA > Sagatun Mono 1.7 > Tundra Mono 3.0 > Graham LS8/1F
Cables: Trivium Audio Cables
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch - Help!!

Post by David Neel »

A couple of weeks ago, I rebuilt a Hakai. I have installed Debian 9.9, and MPD and upmpdcli, following Sopper's instructions. I did the mpd.conf file as much as I could, awaiting an ESI DAC. Now I have it, and I have followed all the instructions with the exception of

"You need to modify the mpd.service file to get mpd working:
Code: Select all
sudo nano /usr/local/lib/systemd/system/mpd.service
Make sure this line is exactly like this:
Code: Select all
ExecStart=/usr/local/bin/mpd --no-daemon /etc/mpd.conf"

this is because my system has no systemd directory so the process fails. Any suggestions?

Despite that I have tried to get MPD working but have issues because the mpd.conf file is wrong - it doesn't recognise the music and playlist directories, and also has a fail because no plugin is specified.

I'm slowly working through the logic to get this fixed - I will create the required directories for the music and playlists, as I assume Sopper's examples will not exist automatically. What about the plugin? How should that read in the mpd.conf file? I'll be grateful for all/any pointers on this. I'm NOT a Linux expert (although I successfully run my LSNAS on Debian), and am yet again in danger of batting my head against a brick wall....

Luckily I have tomorrow arranged to go for a long walk along a long beach, so my head will be in a better place afterwards!
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
tokenbrit
Very active member
Very active member
Posts: 2038
Joined: 2012-03-22 19:47
Location: New England

Re: Debian 9 Stretch

Post by tokenbrit »

I want to say those instructions are only relevant if you compile MPD from source... You can install MPD from the Debian Sid repository, which should sidestep the need for these config settings except, possibly, the alsa hw number for your DAC.

Hope you enjoy(ed) the walk on the beach, and that you weren't tempted to do Reggie Perrin rather than face arcane setup issues ;)
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch

Post by David Neel »

Thanks! I will try again this evening. No chance of a Reggie Perrin, but I might take the Hakai to see how many waves it can skip before sinking ;)
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch

Post by David Neel »

That walk was longer than expected, so no further Hakai experimentation, except for thinking...

Situation: I have an LSNAS with two SSDs, one with Debian 9 as the OS and Asset UPnP as the server, and one NTFS SSD with all the music. This works fine with Kazoo control point and ADS/3. So I'm assuming that I don't need to change anything on the LSNAS.

The Hakai has Debian 9, mpd and upmpdcli installed. Currently mpd crashes because of errors in the mpd.conf file, partly because I took Sopper's instructions too literally and did not initially realise that I would need to ensure the Hakai could see the LSNAS music files. (I installed mpd from SID and also copied Sopper's mpd.conf instructions to the letter.)

Do I need Samba? Or will Debian allow me to mount the LSNAS files, without using Samba? If so, what is the syntax for doing this where the SSD is on another machine? (I'm also trying internet search for this answer, but it would be good if someone's done it already.) All help gratefully received!
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
fatjulio
Active member
Active member
Posts: 159
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio »

I have a Debian Stretch Hakai, and followed Sopper's instructions. The one thing I did a little differently was I installed mpd first with apt-get install mpd. This installed an old version, but set up the environment correctly. I then built the version I wanted via the instructions which went over the top of the installed one. I couldn't get it to work otherwise.
tokenbrit
Very active member
Very active member
Posts: 2038
Joined: 2012-03-22 19:47
Location: New England

Re: Debian 9 Stretch

Post by tokenbrit »

If you have Asset on your LSNAS, then your Hakai is not connecting directly to the music files on your NAS, and you don't need Samba. The media (music) server and mpd communicate via http, controlled by your chosen control point (& upmpdcli) - see here for a visual...
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch

Post by David Neel »

fatjulio wrote: 2019-09-17 19:34 I have a Debian Stretch Hakai, and followed Sopper's instructions. The one thing I did a little differently was I installed mpd first with apt-get install mpd. This installed an old version, but set up the environment correctly. I then built the version I wanted via the instructions which went over the top of the installed one. I couldn't get it to work otherwise.
Thanks. I installed mpd with apt-get install mpd, too. Then I simply edited the mpd.conf file. I will try your method.
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch

Post by David Neel »

tokenbrit wrote: 2019-09-17 21:34 If you have Asset on your LSNAS, then your Hakai is not connecting directly to the music files on your NAS, and you don't need Samba. The media (music) server and mpd communicate via http, controlled by your chosen control point (& upmpdcli) - see here for a visual...
Thanks for the visual. It seems I'm not far off, mpd and upmpdcli are both installed. I will try fatjulio's suggestion and then see if I can get mpd working. Good to know the control point will do the connecting.
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
tokenbrit
Very active member
Very active member
Posts: 2038
Joined: 2012-03-22 19:47
Location: New England

Re: Debian 9 Stretch

Post by tokenbrit »

Not far at all... Let us know how you get on, and don't hesitate to ask more as needed - happy to help.
David Neel
Very active member
Very active member
Posts: 975
Joined: 2008-02-08 23:17
Location: The Magical Forest

Re: Debian 9 Stretch

Post by David Neel »

Hakai is now working!!!!
The search for knowledge is not nourished by certainty, but by a radical distrust in certainty
Post Reply