Jump to content

Tasso

Building the ideal(ish) Music Server

Recommended Posts

3 hours ago, kukynas said:

@rmpfyf any progress with your NVidia shield?

It's moved from storage to my study :)

 

Someone has my TX1 dev board, I'll try flash Ubuntu onto my shield instead.

Share this post


Link to post
Share on other sites

Update:

 

....Back from the dead.

 

After months of hassle with a dodgy clock installation, two ruined motherboards, hours of frustration and possibly a dodgy HDMI lead adding to the confusion, I decided to let the pros have a go. Hardware sorted; thanks so much for your help in arranging this @JDWest. I want to give this guy a shout, goes out of his way to understand your problems / needs, goes above and beyond to help out and is a real pleasure to deal with.

 

Pain:

 

Reinstall Windows 10 and associated software aaaaaand blue screens of death. 

 

Many of them.

 

Regularly - all linked to audio (Amanero drivers and wfd01000.sys, mainly).

 

This wasn't an issue before; the only thing that's changed in the 5 months of frustration is Windows 10 (updates). I'm pretty computer literate and could not get this issue sorted out; systematic troubleshooting would just not fix the issue. I do have to say, there was one point when everything worked, infuriatingly, I'd changed nothing and this window of clarity lasted 24 hours or so, everything sounded great, however, no changes later and I was back in the quagmire.

 

Clarity:

 

Idly thinking about root cause analysis one day, I realised that the drivers weren't the real issue, needing drivers in the first place was the issue. So, I decided to try a dual boot system, one with W10 for whatever use and a Linux install. I did some browsing and remembered JD and others here use Snakeoil OS with success. So I downloaded it and spent the weekend to get it working. I've never touched a Linux Distro before and I've got to say, the instructions for installation for Snakeoil could be written in a clearer fashion; this made the hoops that much harder to jump through. With a little perseverance, the installation is actually very simple, quick and easy, once you know how.

 

Conclusion:

 

I've got to say, @rmpfyf had it right all along, Linux just sounds better than Windows 10. I'd recently spent a fair bit of cash on Fidelizer, Audiophile Optimiser and Process Lasso for Windows 10, they made a significant improvement to the sound of the system. Snakeoil OS (can't speak for other Distros) immediately sounds better out of the box, I guess the Windows software I bought were just methods of polishing a turd. I'm extremely impressed with how Snakeoil OS operates. I won't be going back to Windows for my audio needs.

 

Using Snakeoil to install custom software is very easy - I've got Jriver 23 up and running, with all of my geeky tweaks to the programme running without issue.

 

I'm so glad to have my music back, to have it back and sounding better than before is just a blessing :wub:

 

Questions:

 

I've still got a few kinks to iron out with Linux (always the way, right?). Any help with the following questions would be greatly appreciated:

 

  • I've read that increasing the player's (JRMC here) priority helps - can anyone tell me how to do this please?
  • I recall being told that giving software it's own CPU to operate on reaps benefits - how does one achieve this in Linux?
  • Is there anything else that I should look into as far as software optimisation is concerned?

Share this post


Link to post
Share on other sites


2 hours ago, realysm42 said:
  • I've read that increasing the player's (JRMC here) priority helps - can anyone tell me how to do this please?
  • I recall being told that giving software it's own CPU to operate on reaps benefits - how does one achieve this in Linux?
  • Is there anything else that I should look into as far as software optimisation is concerned?

 

I'm going to explain some stuff which will seem weird coming off Windows, but don't worry, at worst we can find some time and help out maybe in person.

 

Increasing priority needs to be done with some forethought. Some tuners - PeterSt of Phasure DAC fame - reckons you need as many cores as possible to ensure that the one core doing audio doesn't get interrupted with anything else. In Linux I do it the other way around - I boot the system with reserved cores (which means 'don't use these unless it gets super extreme') and then play audio on a different core. This is a lot cheaper (a 4-core CPU is plenty, though you'll want cache) and more possible in Linux because I can play music - complete with network access and a NFS client to read files on my NAS - with not more than 15 processes, the majority of which are sleeping during playback (doing the same in Windows is nearly impossible). 

 

Naturally assuming you have hyperthreading disabled in BIOS and you've had a play with C-states enough to have settled on something that works for you (stop me here if not).

 

So to reserve cores you need to add the following to the kernel boot parameters:

 

isolcpus=x,y,z

 

Where x,y,z are the CPU kernels you don't want the computer to use. You will also want to compile the kernel without the multicore scheduler, e.g. without the bit of software that says 'hmm, I need to do something, now let me think about how I break this up among the CPU cores I have at my disposal here'. This will give you a system that is fast and responsive to most tasks for an audio PC without high and variable latency in thinking about what comes next.

 

Then to run anything on a particular core you use the taskset command, which is part of the utils-linux package. e.g. taskset <COREMASK> <PROGRAM NAME>, where coremask is the CPU (or CPUs) you want to launch something on, and program name is the executable path to that program. You will want to give whatever launches that program superuser privileges, which are required to manipulate system calls of this nature. 

 

You will also find (get this) that your audio will sound different depending on which core you play it on. This is in part because the physical difference between the cores differs, and whilst one is your player and only your player, your audio devices are running off another, and the difference in latency is often audible. So play around. 

 

Increasing priority can be done with the nice command, though if you're using a Linux distribution and have the real-time kernel installed (I assume you do) then against, the utils-linux package has the chrt command which allows you to manipulate the real-time priority of any process (as launched or when running). This isn't limited to the player for your device, but also the processes tied to music-relevant interrupt requests ('hardware says ship a few more bytes of music.... now!'). It requires a bit of tweaking. SnakeOil OS from memory has a screen that allows you to tweak a few of these, though setting everything at realtime (priority=99) can grind your computer to a halt occasionally as it deals with stuff it's been told to deal with right now with no excuses

 

Other stuff you'd do? Heaps!

 

  • Setup a RAM disk and script your players to run through that if not doing it already
  • Delete your swap partition or file (depends which vers Linux, some use a file, most a partition) if not done already
  • Set your clock sources and frequencies correctly
  • Optimise system component frequencies
  • Power down all unneeded USB (mentioned this a few posts up)
  • Remove unnecessary processes (there are many), including removing DHCP and running a static IP
  • Reserve a core for DRC and run that if you like
  • Many more

 

Welcome to Linux!

Edited by rmpfyf

Share this post


Link to post
Share on other sites

Thanks for taking the time to write all of that mate.

 

To answer one of your initial questions, I think I've found a place I'm happy with re C stated (Everything above 3 deactivated - this keeps the L3 cache available). I've got CPU and RAM clocked down to 800mhz. As much stuff turned off as I dare in the UEFI.

 

Lots to take in and TBH, lots I don't currently understand, there's always an overhead with making a switch huh?

Share this post


Link to post
Share on other sites
34 minutes ago, realysm42 said:

Thanks for taking the time to write all of that mate.

 

To answer one of your initial questions, I think I've found a place I'm happy with re C stated (Everything above 3 deactivated - this keeps the L3 cache available). I've got CPU and RAM clocked down to 800mhz. As much stuff turned off as I dare in the UEFI.

 

Lots to take in and TBH, lots I don't currently understand, there's always an overhead with making a switch huh?

Glad to hear - they're almost the same as my settings, though many here find a different path works :P 

 

Try the RAM as fast as you can (1600MHz or 2400MHz); see how that sounds. 

 

Always an overhead with a swtich, unless you grab priority. You can grab priority :) 

Share this post


Link to post
Share on other sites

@rmpfyf Hi Riccardo,

 
I want to have a go at isolating my media player to one core, I've got some questions though:
 
  1. How do I know how many programmes I have to add? EG - it's Jriver, I know there's the main programme, but if there were related threads, how would I go about identifying them so nothing it missed?
     
  2. I found this link that explains how to add Kernel boot parameters and this link that shows the isolcpu procedure; when I use coremask to force it to use JRiver on that reserved core, how do I save this (so I don't have to do it every time)?


Bonus questions:
 

  • How do I shut down unnecessary processes on Linux, what's the equivalent to Services.msc?
     
  • How do I set up everything to run through ram? I've got JRMC set up to use memory playback already, does this render this one moot?

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×