Jump to content
IGNORED

AudioLinux and NUC Troubleshooting and Tuning


rickca
Message added by austinpop

Summary of useful findings and recommendations

 

This section will be a living repository of useful info from this thread. It's very similar to a wiki and will be maintained by a small group of thread moderators.

 

Before you get started please refer to the Audio-Linux website to ensure you have the latest info and the proper versions of the OS. Audio-Linux.com  

 

**** Updated for AL 1.30 menu 118 or later.

 

  "First Run" setup for headless.  

 

Setup your NUC with a keyboard, mouse, and monitor to the NUC BIOS settings.  From the menu note the IP address of the machine to SSH into.  From a MAC the macOS terminal program supports SSH:

324537708_ScreenShot2019-01-28at3_02_19PM.thumb.png.739dc7f9cdb05e04da806c7c66877332.png

 

Then it is simpler to cut and paste into the terminal session. After entering the password for the audiolinuxuser you will be presented with the AL headless menu:

 

1518375894_ScreenShot2019-01-28at3_04_18PM.thumb.png.a7b2867a163f8f014e56e52ff69f94b4.png

 

Option 8 takes you to the command line for the following basic setup.  You will need to be the Root user for this setup and the su command first:

 

su

 

Fix the time zone:  (this is my timezone - look in directory /usr/share/zoneinfo)

 

timedatectl set-timezone America/Chicago
 

Setup and Start NTP daemon (to keep the system time in sync)

 

*** the config file is now properly filled in.

 

Now Start the daemon

 

timedatectl set-ntp true

 

 

NOTE: Sometimes the system takes a little while to get synced up.
 

Set hostname  (this provides a unique name for the machine on your network.  Replace <NAME> with your chosen name)

 

hostnamectl set-hostname <NAME> 
 

Once the above items are set up your machine is ready to be configured for say a Roon bridge/endpoint. That is done using the AL menu.  To return to the menu do the following commands.

 

exit

menu

 

----------------------------------

 

For most of us, the following basic settings are key.

From the configuration menu:

6. START and enable Roonbridge

15. SET Realtime Priority to extreme

16. ENABLE ramroot (reboot after)

 

Return to the main menu and reboot the NUC using 

 

11 Reboot

 

------------------

Roon Server setup is a bit more complex and we will cover it completely a bit later.  The key is where you are booting from and where the Roon database is stored.  In general; say a 32gb OPTANE "SSD".

 

  • You have to partition the SSD into a boot drive and a storage drive.  
  • The transfer the USB stick install to the boot partition.  
  • Reboot from the boot partition.  
  • Do the basic setup. Timezone and name
  • Transfer the Roon Database to the storage drive
  • Start the Roon Server
  • .....

 

----------------- 

The machine will reboot and from the display attached to the NUC you can watch it boot up and load into RAM.  Once the AudioLinux menu is showing the endpoint should be available in Roon.    This completes the basic startup sequence.  The system is ready to start testing.    

 

 

Recommended Posts

40 minutes ago, afrancois said:

As most AL users strive to have AL in RAM it would be nice to have AL started using Netboot. Thus booting over ethernet.

It will be somewhat harder to configure, but this way you will not have to manually remove the USB thumb drive (or in my case the USB SSD drive)

I've done this a long time ago, to load an entire OS from the network. The bootloader and the drives were on my NAS. I did configure a LUN and some iSCSI drives if memory serves me.

 

Agreed, that would be an elegant solution. I’d love to know how to configure this...

Link to comment
  • austinpop changed the title to AudioLinux and NUC Troubleshooting and Tuning
3 minutes ago, ray-dude said:

@austinpop Thank you for the additional impressions. May I ask where you ended up with your end point SqueezeLite parameter settings?  (your /etc/squeezelite.conf )

 

I've just stood up my NUC7CJYH as a Roon Bridge end point, and want to experiment with the Roon Server/SqueezeLite end point configuration that you developed (alas, I confess that the myriad of SqueezeLite parameters are all still pig latin to me)

 

Yes, this is the reality of NUC-world. It's a bit wild west. 

 

As regards squeezelite, the main parameter for SQ is the -b one for preallocated buffers. I was lucky that my first experiment with AL was on a Zenith SE that already used squeezelite as its internal player. I was able to duplicate the settings in the existing conf file.

 

Other than that it's trial and error and forums! I can try and help out, but no guarantees. First, get me a few key things:

  • install squeezelite (not R2) from the AL guide
  • amount of RAM on your NUC?
  • Run squeezelite -l and tell me your output
  • Do you care about DSD? Does your DAC require DoP?

We'll go from there.

Link to comment
6 minutes ago, ray-dude said:

 

Thank you Rajeev

 

I just got my NUC7CJYH w/ 8GB up and running headless in RAM root (thank you and everyone here).  Runs great as a Roon Bridge, connected via USB to my Chord Blu2 (then Chord DAVE DAC).  Upstream I have a vanilla Mac Mini (OSX) running my Roon Core, not yet optimized.  With this setup, I need the end point to just pass things bit perfect to the BluDAVE and let it do its (considerable) magic.

 

The tunability of the Squeezelite end point (vs Roon Bridge) seems like a great opportunity to dig in and figure out what is driving the SQ boosts we're all hearing.

 

 

 

 

My /etc/conf.d/squeezelite settings are:

 

parameters="-o front:CARD=Blu2,DEV=0 -b 2097152:2097152"

 

(piggybacking on your findings that maximizing buffers makes things better, although I'm wondering if weighting more towards the input or output would move the SQ needle...TBD)

 

However, I was also looking at the real time priority, parameters for connecting to the DAC, and even codec settings as potential SQ levers (TBD how the stew of latency and compute and OS priorities all come together when you expand the test matrix)

 

I hoping to dive in this weekend and start doing some investigations.  If you (or others) have run into dead ends or opportunity areas with Squeezelite as the end point, it be great to build on that!

 

 

 

 

Excellent. If those setting are working, then you're good to go, and we would love to hear about your findings.

 

Link to comment

BTW, this one's a bit arcane, but Piero tells me it will be delivered in a "monitor menu" that he'll hopefully deliver in 0.6.

 

Say you booted your NUC a few days ago - but can't remember if it was in Extreme mode? How can you tell at runtime?

 

Per Piero:

you can type
cat /proc/cmdline
If you have booted in Extreme mode you will see these parameters:
intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll
Link to comment
What is the proper way to update my system to 0.6 while preserving all customizations? I did this - downloaded the 3 files below:

-rwxr-xr-x 1 audiolinux users 70295236 Dec  6 17:32 linux-rt-bfq-4.19.1.3-2-x86_64.pkg.tar.xz

-rwxr-xr-x 1 audiolinux users 16020220 Dec  6 17:33 linux-rt-bfq-docs-4.19.1.3-2-x86_64.pkg.tar.xz

-rwxr-xr-x 1 audiolinux users 18297092 Dec  6 17:33 linux-rt-bfq-headers-4.19.1.3-2-x86_64.pkg.tar.xz

 
I then ran 
 
pacman -U linux-rt-bfq-4.19.1.3-2-x86_64.pkg.tar.xz linux-rt-bfq-headers-4.19.1.3-2-x86_64.pkg.tar.xz linux-rt-bfq-docs-4.19.1.3-2-x86_64.pkg.tar.xz 
 
I rebooted, but when I login, I still see 0.5 on the login screen. And, if I type alconf I still get the old menu. 
 
Finally, what is the command for the new monitor menu?
 
All of this is on headless.
Link to comment
10 minutes ago, lmitche said:

Download a new image and reapply your settings. There is no persistence for the alconf settings although some will be correctly set by default. You may need to re-add any custom scripts as well. I built a checklist. No big deal if you know what you are doing. It gets easier with every release.

 

7 minutes ago, LTG2010 said:

That's just to update the Kernel (engine) not the whole OS. I'm still on 0.3 :)

 

OK thanks guys. Piero confirmed the same.

 

BTW - I don't have Intel Speedstep in my NUC7i7DNBE BIOS at all. I am guessing it's only applicable to Pentium, not Core i7?

Link to comment
11 hours ago, BigAlMc said:

Apologies if I've missed this either here or on the mothership as Rajiv put it ?

 

I have the parts arriving today and tomz to attempt building an AL NUC server over the weekend. Occurred to me when walking into work this morning that there are a couple items I don't have a clue about. [Ok there are many, many items I don't have a clue about ?, but these are specific items].

 

I know how to install and format an SSD in a windows environment where it would detect the new drive and prompt you to take actions from there.

 

Q1. What is the story on AL? Will it recognise the drive and prompt me? Or (gulp!) do I need to use Linux commands to install and format it? And if the latter can anyone point to simple instructions for this?

 

Q2. If I have my music files available on either a Windows laptop or an external USB harddrive, how do I copy them onto the SSD in the AL NUC server. I'm assuming this is definitely Linux commands. Again any guide for this sort of thing would be great.

 

Thanks in advance!

 

Alan

 

 

Did you get an answer? I know how to muddle my way through it using gparted on the command line. I'm guessing there is an easier way to do it with the LXQT version that someone can elaborate.

Link to comment
36 minutes ago, Dutch said:

@hifi25nl,

 

Some questions after reading: http://www.audio-linux.com/html/realtime.html

 

I’m running just Roon Bridge on my AL headless (0.6) NUC (it’s the endpoint) and I’m seeing these related processes :

 

root       544     1  0 17:41 ?        00:00:00 /bin/sh /opt/RoonBridge/start.sh

root       549   544  0 17:41 ?        00:00:01 RoonBridge --debug --gc=sgen --server RoonBridge.exe

root       590   549  0 17:41 ?        00:00:10 RoonBridgeHelper --debug --gc=sgen --server RoonBridgeHelper.exe

root       595   549  0 17:41 ?        00:00:00 /opt/RoonBridge/Bridge/processreaper 590

root       601   549  0 17:41 ?        00:00:39 RAATServer --debug --gc=sgen --server RAATServer.exe

 

In the rtapp.conf file (below) I see RoonBridge is listed but not RoonBridgeHelper or RAATServer. Since these have used more CPU time, would it be beneficial if I/we added those processes to the applications list?

 

Also I see —debug in the process list? Is that necessary or better said would it be ‘leaner and meaner’ to not use those switches?

 

Thanks in advance. If you’d like me to email you instead please tell me. It’s just that I though this might be beneficial to other users as well. :)

audiolinux@audiolinux ~]$ more /etc/rtapp/rtapp.conf

APPLICATIONS="jackd mpd hqplayer hqplayerd RoonAppliance RoonBridge mediacenter24 networkaudiod deadbeef a2jmidid ardour-5.12.0 rosegarden audacity"

 

MAX_PRIORITY="93"

 

MODE="autodec"

 

Good questions. I actually went ahead and added RAATServer (and squeezelite) to the list. Can't say it had an audible effect!

 

The --debug question is a very good one. I hadn't even noticed that.

Link to comment
2 minutes ago, gsquared said:

@Dev if I recall, you have the NUC8i7BEH, which is the model I have. 

 

I am running mine as a Roon server headless with AL + the Roon db in ram. I have a monitor hooked up while I get it fully configured, but I'm finding that it almost always throttles (cup clock throttled) - and it's just sitting idle. I have it running in Standard mode as well. Does yours typically throttle? I wonder if it's because I have my Roon db loaded into RAM as well.

 

@lmitche @austinpop any ideas how to solve this issue? I'm thinking about getting Optane memory to store the Roon files on to see if that solves the problem.

 

 

 

When you say "throttled" what do you mean? What metric are you referring to, and how are you measuring?

 

If on the off chance you are referring to 100% CPU utilization, then perhaps it's just the initial scanning of the library and the building of the Roon DB.

Link to comment
17 minutes ago, ray-dude said:

 

Looking forward to your report Rajiv!  

 

I was able to spend some time with the squeezelite ALSA parameters before fatigue set in.  From the help page:

 

 

It is frustratingly difficult to find out what these various parameters mean.  From @bibo01 we've learned that the developer of squeezelite r2 uses "-a 499:3::0".  The default is "-a 40:4".  Others have posted experiences with "-a 499:3"

 

From my hair pulling (aka reading) sessions, I suspect the second parameter is very DAC dependent, but that is a pure guess.  In my experimentation with my BluDAVE stack, I found 4 to be the best, but it was very limited experimentation.

 

I spent most of my morning trying different ALSA circular buffer time values.  Note that when the buffer time value is 500 or greater, it is interpreted as bytes, and when it is below 500, it is interpreted as milliseconds.  This controls the size of the circular ALSA buffer that sits between squeezelite and your DAC (ALSA is the OS-level sound drivers in linux).  The period value reflects how the various channels are interleaved in the buffer, and the format value reflects how many bytes to reserve for each value.  I got lost in the ALSA docs and source code any deeper than that, so please forgive me if I have any of this wrong.

 

My strategy was to peg the period at 4, and leave the format and mmap values as default (in my case "any" and 1)

 

For those that want to play at home. at the command line, I was running squeezelite manually to make it easier to toggle various parameters:

 

/usr/bin/squeezelite -o front:CARD=Blu2,DEV=0 -b 4097152:97152 -d all=debug -a <various>:4 -c pcm -x

 

Execute the command, give a listen, control-c to kill it, modify the parameters, rinse and repeat

 

Breaking this down, -o points squeezelite at my DAC, the -b reflects stream and output buffer memory that gets reserved on start up (see my previous post above), -d sets out the log output level so I can follow the test in the terminal window (which is very informative!), -c restricts squeezebox to only use the PCM codec, and -x says "don't as the server to downsample anything".  

 

-x and -c should be no ops, since Roon Core is streaming PCM to the NUC, but I thought it wouldn't do any harm to disable features in squeezelite and keep things simple.

 

For these experiments. -a parameter is the one of interest to me, as it manages the output circular buffer between squeezelite and the OS and the DAC.

 

Using primarily Redbook content (my Blu2 does all my upsampling) that I am very familiar with, I tried <various> ALSA circular buffer sizes from 1000 bytes up to 1,000,000,000.  Since I'm just trying to figure out what all these parameters do (and if they matter), I used a limited number of audition tracks.  Fine tuning will come later.

 

The bottom line is I heard a notable uptick in SQ as I increased the circular buffer size, but things got progressively more flakey with Roon Core and latency went way up as the buffer size got to the top end.

 

I found my sweet spot to be between ~50-100MB (very sweet spot actually...delightful!):

 

/usr/bin/squeezelite -o front:CARD=Blu2,DEV=0 -b 4097152:97152 -d all=debug -a 100000000:4 -c pcm -x

 

To triangulate and spot check, a ~4:00 Redbook (44/16) ALAC file is ~27MB, ballooning to ~43MB when decoded to PCM.  My hypothesis is that if you can fit the entire PCM content in the ALSA circular buffer, you're as buffered as you're going to get.  Set the USB for your DAC to the highest IRQ RT priority and have squeezelite a close second in real time priority, and I'm not sure you can do any better (outside of continued OS tuning to get more and more real time)

 

So how do high res files (24 bit and higher sampling rate, etc.) and DSD files impact this?  Is this setting over optimized for Redbook content?  My ears and brain are too tired to check today ;) 

 

My next step is to experiment with high res content (does 24 vs 16 bit changes the sweet spot?), DSD content (does it work ok?), and longer content (do I need a bigger circular buffer?).

 

The big next step is to see if an extra large ALSA circular buffer enables reallocating precious memory from the squeezelite buffer (the -b parameter above....currently heavily weighted on the streaming (ethernet) side) to the ALSA buffer between squeezelite and the DAC.  

 

In other words, if you're willing to live with the latency, does having a maximum ALSA circular buffer (large enough to fully buffer all your PCM content) make the upstream buffering (or running Roon core on the same NUC) less relevant to SQ?  I'm hoping the answer is yes!

 

 

 

 

 

Awesome. Fascinating findings! Now I will have to find time - a commodity in short supply - to play with the asymmetric -b, and then the -a setting.

 

Not sure when that'll be, but thanks so much for your efforts!

Link to comment
1 hour ago, misterspense said:

Are you guys using the R2 version of Squeezelite, or the 1.9 version? Is there also a sound quality difference between them, or are they more related to the settings used, and the standard settings R2 and 1.9 come with?

 

I'm using the community "Ralph Irving" version. I had trouble getting R2 working, although it may have been resolvable with more effort. I also got confused with a seeming dependency on C-3PO, although that may have been a misunderstanding.

 

Piero now has links to both.

Link to comment
2 hours ago, BigAlMc said:

Thanks @afrancois

 

I've spent the morning pottering and am admitting defeat. The i7DNBE is not willing to boot with either the LPS1.2 or the SPS-500.

 

I've switched off everything possible and disconnected everything possible and no dice. It just doesn't seem to like either.

 

Am thinking I'm gonna need to buy a new PSU (Sean Jacobs, HD Plex etc) but that's really annoying when I have a collection of PSU's at hand!

 

Cheers,

Alan

 

Thats weird. I used an sPS-500 set at 19v to first boot my NUC7i7DNBE before I made any BIOS changes.

 

When I get a chance, I’ll confirm it still works. 

 

What actually happens when you turn the NUC on? I’m assuming your sPS is truly on - you know that drill with the long press of the power button?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...