Xruns on linux mint 17.2 and kxstudio software

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

glowrak guy
Established Member
Posts: 2315
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 251 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by glowrak guy »

gimmeapill wrote: I bet that JohannesTress has a good reason to search for a low latency setup otherwise he would probably not have invested in a an RME Babyface and a new notebook in the first place...
No mystery, he posted why:
"Recently I'm a lot into Bitwig-Studio and doing live-electronic stuff. Therefore I need a very low latency (64 samples would be perfect)."

I would prefer customizing a desktop case/monitor, and being creative with it's 'stand', for live use.
Laptops are prone to falls and theft, and internally designed for office apps, comms, and basic gaming. His choice looks good, as notebooks go,
but a fullblown i7, and pci soundcard, would be far better for media work. Of course, he well may dual-purpose this notebook
with a separate career where it is needed and useful. A linux Bitwig set would really benefit from a large monitor or two.
The notebook likely has some video output port(s) for such good times.
Cheers
glowrak guy
Established Member
Posts: 2315
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 251 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by glowrak guy »

asbak wrote: For a traditional musician, timing matters.
Of course it matters, but it is never static, regardless of instrumenation, or 'the song',
unless the musician can precisely play a composers purposely created static composition, which in classical music,
is often laced with terminology stating 'alter the timing, here, there, on page three, in the middle, and at the end...'

Modern machine based music is not 'composition', and soon brought rise to the need for both humanizing technology,
like 'swing mode', and de-humanizing quantization, to compensate for common slacker practice regimens.

The RT in Studio 1337 is great. There are beast patches out there that are not playable on my old computer, without it.
It's sure spared me from a few hardware $upgrade$ along the way.
Cheers
JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

Hey there thanks again for your thoughts. And indeed i know why I demand low latencies. As a live player (sax, guitars, voice) I really know how important it is to work with a low round trip latency.
Your advice to buy a rack-system astonished me, cause all of my colleagues are using macbook pros and nearly every professional is using ableton, kontakt, etc. on stage, so why should I not be able to do so with a linux system?
But all this discussions won't help me to solve my problem. I'll try to install kxstudio instead of linux mint and see if this will solve my problems...
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by gimmeapill »

Nah, you don't need a desktop to get decent latency (especially with a pro grade sound card like the RME).
I haven't seen a desktop racked on a stage for quite a while either - and your previous configuration was working after all.
But you also cannot expect to have everything working out of the box with your particular new hardware configuration (and with the desired level of performance) without some tuning.
Before wiping out your installation, I'd suggest trying to boot one of the audio oriented distributions from a live media - just for the sake of comparison...
Also if you own a bitwig license, it could be interesting to check on their side if there's any tuning recommendation, preferred distros etc...

On the HW side, I haven't seen mentioned 2 things:
- Turboboost: disable it. You don't want your cpu to be throttled in the middle of a session.
Your Core i5-5200U cannot possibly run all the time at the max 2.7 GHz turbo frequency due to thermal constraints (altough those Lenovos seem to have a pretty solid cooling design). What you want for stable audio is your cpu to run at the maximal nominal frequency in perf mode - that would be 2.2 GHz.
- hyperthreading: disable it, at least during testing. But it's probably not as bad as it used to be with previous generations.
JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

I allready installed KXStudio - but it didn't bring the effect I hoped it would. I have still terrible Xruns (with Bitwig and Carla as well). If I scroll down on webpages or move windows around the desktop it gets even worse - could it be possible, that there is a problem with the graphic card? I have the built in broadwell chip card on the cpu (intel hd5000).
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by gimmeapill »

Possibly a HW acceleration issue since this is a relatively new chip (Intel driver, etc..), but the thing is that you shouldn't need it in the first place to run audio apps.
That points directly to the fat desktop envs, like cinnamon, gnome & co. (assuming cinnamon here since you're on Mint - please correct if I'm wrong)
Try something lighter that doesn't require any HW accelerated desktop (gnome-flashback, xfce - at the very least, lxqt, or any standalone window manager).
Then, once you get your performance issues resolved, you can try to re-enable stuff if you find you really need all that eye candy...
glowrak guy
Established Member
Posts: 2315
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 251 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by glowrak guy »

My experience with Bitwig, U-he, and discoDSP, showed that the official nvidia 3d driver
was clearly superior to the alternatives, in compatibility, function, and speed. That is in
pclinuxos. I've not attempted the official nvidia in debian/ubuntu, for lack of need, but it shouldn't be
difficult.

The old way was to download the linux driver from nvidia, copy it to /
switch to runlevel 3, and run the installer, and watch for the splash-screen flash
after rebooting.

But distros vary in their purpose and quality, as do computers.
I doubt there will ever be a better high-end audio solution than using the official nvidia video.
I'm not saying that the 2D from intel/amd is useless, and it's getting better every year.
But successful linux audio work has always been about aquiring compatible hardware,
(not just the newest) installing software that works, and refusing to upgrade a working system.

I checked a kde setup in htop not long ago, and it wasn't a cpu hog at all. I doubt any linux gui today
uses enough resources, to over-ride ones taste in appearance and function, should the choice arise.
Cheers
JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

Tried with a selfcompiled rt kernel (4.1.10) but it's the same with the xruns especially when moving windows or scrolling pages... :?
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: Xruns on linux mint 17.2 and kxstudio software

Post by gimmeapill »

That's still progress: at least now you know the performance problem is possibly an acceleration issue related to Intel HD Graphics 5500 support in Mint (or even upstream).
But before jumping into graphic troubleshooting, you should really try to install one of the light window managers or non accelerated desktop envs from the Mint repos, choose it over the defaut desktop env. on session opening and see if the perf. issue is still there.

If the graphic issue is confirmed, follow the various Mint/Ubuntu Intel graphics troubleshooting guides/forums etc...

One simple thing to try that shouldn't break anything is to fallback to UXA acceleration (SNA being now be the default):

if it doesn't exist, create /etc/X11/xorg.conf.d/20-intel.conf (welcome back xorg.conf!)

with the following content:

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection
(and reboot)
JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

Thank you, but both tipps didn't work. I installed lxde and even before starting bitwig I got 11 xruns.
To be honest I'm really frustrated right now - Linux seems not to be able to handle audio on new computers as I expected it too.
folderol
Established Member
Posts: 2069
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 224 times
Been thanked: 400 times
Contact:

Re: Xruns on linux mint 17.2 and kxstudio software

Post by folderol »

Whilst I have every sympathy with your issues here I'd like to add a little perspective.

At LAC2015 I ran a new dual core i5 laptop with a stock debian install for over an hour and a half while demonstrating Yoshimi, making lots of very significant changes and playing a MIDI keyboard. Near the end of the workshop I also loaded Rosegarden and got it to play a 12 channel piece which while running also made Yoshimi load and set each instrument without a break in the music. At the very end of the session I opened jack's messages window. There wasn't a single Xrun.

So, if it can be done under such circumstances, there aught to be a way to track down exactly where the problem is that you are having.
Knowing what cpu speed you should be getting, what result does the following command produce in a terminal?
cat /proc/cpuinfo

As well as a lot of other info, this will tell you exactly what speed each core of the cpu is really working at.
Do you have cpufrequtils installed? This can be used to force a reluctant machine into 'performance' mode from userspace.
The Yoshimi guy {apparently now an 'elderly'}
JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

If I'm right, the result shows me, that the cpu runs a higher frequency than 2,2 ghz.
I didn't find an option in the bios to disable turbo boost, at last there is no option that mentions it. What I did instead is, I disabled power management.

Code: Select all

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2425.070
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.46
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2453.429
cache size      : 3072 KB
physical id     : 0                                                                                                                                                                                  
siblings        : 4                                                                                                                                                                                  
core id         : 0                                                                                                                                                                                  
cpu cores       : 2                                                                                                                                                                                  
apicid          : 1                                                                                                                                                                                  
initial apicid  : 1                                                                                                                                                                                  
fpu             : yes                                                                                                                                                                                
fpu_exception   : yes                                                                                                                                                                                
cpuid level     : 20                                                                                                                                                                                 
wp              : yes                                                                                                                                                                                
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.46
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2455.320
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.46
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 1963.843
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.46
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

JohannesTress
Established Member
Posts: 101
Joined: Fri Jun 21, 2013 3:56 pm

Re: Xruns on linux mint 17.2 and kxstudio software

Post by JohannesTress »

Edit:

I found the particular setting to turn off turbo boost. Now I get this:

Code: Select all

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2200.257
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.54
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2203.351
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.54
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2200.257
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.54
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping        : 4
microcode       : 0x21
cpu MHz         : 2200.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs            :
bogomips        : 4389.54
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

But: Still the same behaviour with loads of xruns...
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Xruns on linux mint 17.2 and kxstudio software

Post by briandc »

Are you connected to the Internet while playing? I've noticed a difference on my computers if I disconnect from the network.


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Xruns on linux mint 17.2 and kxstudio software

Post by briandc »

Another thought: xruns are caused by something else asking your computer for resources. So, you could run "top" or "htop" while playing and see what other apps are showing up. Perhaps PulseAudio? You can also check the interrupts, which should help find the culprit:

Code: Select all

cat /proc/interrupts

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
Post Reply