optimizing firewire settings

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: optimizing firewire settings

Post by Pablo »

What is the output of:

ulimit -r -l
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

Code: Select all

ulimit -r -l
real-time priority              (-r) 0
max locked memory       (kbytes, -l) 64
thanks!
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

...also, (this may have to do with it) i would like to use my echo as standard soundcard.
So if i play a clip the sound comes from there.
I tried in the connections "audio" but i am not sure which ones to connect...
There are 12 ins and 12 outs.

I do not seem to be able to run qjackctl at all if i am not root.
If i write qjackctl in the terminal it will open but if i press start nothing happens.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: optimizing firewire settings

Post by Pablo »

Code: Select all

real-time priority              (-r) 0
max locked memory       (kbytes, -l) 64
So you don't have realtime priority nor memlock privileges (it should read ninety-something and unlimited (or a high number of kbytes), respectively).

These privileges are the most important linux system configuration to run jack as a user.

Please show the output of:

Code: Select all

groups && cat /etc/security/limits.conf /etc/security/limits.d/audio.conf
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

Thank you! i am doing some reading :)

Code: Select all

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user, <domain> must be
#          the literal username root.
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#        - chroot - change root to directory (Debian-specific)
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4

# End of file
# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
#    dpkg-reconfigure -p high jackd

@audio   -  rtprio     95
@audio   -  memlock    unlimited
#@audio   -  nice      -19
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: optimizing firewire settings

Post by Pablo »

The lines that give the realtime and memlock priorities to the audio group are there. Now the question is, does your username belong to the audio group?

From the user terminal, type "groups":

Code: Select all

user_name@computer_name:~$ groups
Is "audio" listed here?

If not, you have to add your username to the audio group: From a root terminal (or via sudo, if available, from the user terminal):

Code: Select all

#adduser user_name audio
Of course, replace "user_name" with your real user name and note that this operation needs a reboot to take effect.

If you already belong to the audio group, you even reboot the computer to double check, but "ulimit -l -r" still says 0 and 64, then we will see.
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

thank you!

Code: Select all

Adding user `onno' to group `audio' ...
Adding user onno to group audio
Done.
Pablo wrote:does your username belong to the audio group?
...
Is "audio" listed here?
yes, it is now :)

ulimit -l -r

Code: Select all

max locked memory       (kbytes, -l) unlimited
real-time priority              (-r) 95
uname -a

Code: Select all

Linux aeLiXihr 3.6.11-gnu-3-generic-rt25 #precise1 SMP Sun Jan 6 10:03:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
so i am not on the rt-kernel
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: optimizing firewire settings

Post by autostatic »

That doesn't seem to be a RT kernel, it should read SMP PREEMPT RT instead of just SMP. I've checked the config and indeed:

Code: Select all

# CONFIG_PREEMPT_RT_FULL is not set
Voluntary Kernel Preemption is set though so I think someone made a mistake here. But it's a 3.6 kernel and apparently a lot of things changed regarding the RT patchset so I could be mistaken myself.
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

sorry, i do not understand what you are saying.
Before, i did:

Code: Select all

sudo apt-add-repository ppa:linux-libre/rt-ppa
sudo apt-get update
sudo apt-get install linux-libre-rt
so i think i have an rt-kernel installed...
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

3.6.11-gnu-3-generic-rt25 #precise1 SMP Sun Jan 6 10:03:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
probably is the realtime-kernel?
"RT" is blinking yellow in Jack...

I no longer have to be root to be able to start Jack so i think that audio group thingy worked.
Still i have hangups playing back my Ardour project. (85 (169) x-runs in 13 minutes)

Code: Select all

$ grep -e CONFIG_IRQ_FORCED_THREADING=y -e CONFIG_PREEMPT=y /boot/config-`uname -r`
returns:
CONFIG_IRQ_FORCED_THREADING=y ... then your kernel is using IRQ threading

I found someting else:
apt-get dist-upgrade
This command installs up-to-date version of packages, and may install additional packages.
Should i do that?

And should i do anything with the CPU frequency scaling?

is it yet time for Raboofs script? and, if so, how?
like this:

Code: Select all

sudo apt-get install mercurial
hg clone https://realtimeconfigquickscan.googlecode.com/hg/
cd hg
perl realTimeConfigQuickScan.pl
or:
To get the script install Git first and then pull in the script:

Code: Select all

git clone git://github.com/raboof/realtimeconfigquickscan.git
cd realtimeconfigquickscan
perl ./realTimeConfigQuickScan.pl
Thanks!!
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: optimizing firewire settings

Post by autostatic »

You're not using a realtime kernel. RT blinking in JACK means that it's running with a realtime prio. You don't need a RT kernel for that.
apt-get dist-upgrade won't improve anything.
You will want to disable CPU frequency scaling.
raboof moved his script to github so you need the last method.
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

thankyou!
AutoStatic wrote:raboof moved his script to github so you need the last method.
i did:

Code: Select all

sudo apt-get update
sudo apt-get install git-core
looks like that worked:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  sbsigntool gir1.2-timezonemap-1.0 realpath gir1.2-json-1.0
  libdebian-installer4 apt-clone dpkg-repack archdetect-deb python-pyicu
  gir1.2-xkl-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  git git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
  git-email git-gui gitk gitweb
The following NEW packages will be installed:
  git git-core git-man liberror-perl
0 upgraded, 4 newly installed, 0 to remove and 56 not upgraded.
Need to get 6,742 kB of archives.
After this operation, 15.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://es.archive.trisquel.info/trisquel/ toutatis/main liberror-perl all 0.17-1 [23.8 kB]
Get:2 http://es.archive.trisquel.info/trisquel/ toutatis/main git-man all 1:1.7.9.5-1 [630 kB]
Get:3 http://es.archive.trisquel.info/trisquel/ toutatis/main git amd64 1:1.7.9.5-1 [6,087 kB]
Get:4 http://es.archive.trisquel.info/trisquel/ toutatis/main git-core all 1:1.7.9.5-1 [1,384 B]
Fetched 6,742 kB in 9s (688 kB/s)                                              
Selecting previously unselected package liberror-perl.
(Reading database ... 135794 files and directories currently installed.)
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously unselected package git-man.
Unpacking git-man (from .../git-man_1%3a1.7.9.5-1_all.deb) ...
Selecting previously unselected package git.
Unpacking git (from .../git_1%3a1.7.9.5-1_amd64.deb) ...
Selecting previously unselected package git-core.
Unpacking git-core (from .../git-core_1%3a1.7.9.5-1_all.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up git-man (1:1.7.9.5-1) ...
Setting up git (1:1.7.9.5-1) ...
Setting up git-core (1:1.7.9.5-1) ...
than i did:

Code: Select all

git clone git://github.com/raboof/realtimeconfigquickscan.git

Code: Select all

Cloning into 'realtimeconfigquickscan'...
remote: Counting objects: 58, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 58 (delta 41), reused 45 (delta 28)
Receiving objects: 100% (58/58), 21.61 KiB, done.
Resolving deltas: 100% (41/41), done.

Code: Select all

cd realtimeconfigquickscan

Code: Select all

~/realtimeconfigquickscan$

Code: Select all

perl realTimeConfigQuickScan.pl

Code: Select all

Can't open perl script "realTimeConfigQuickScan.pl": No such file or directory
so that is not good?

to install the realtime kernel i did:

Code: Select all

sudo apt-add-repository ppa:linux-libre/rt-ppa
sudo apt-get update
sudo apt-get install linux-libre-rt
what is wrong there? should i just try again?
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: optimizing firewire settings

Post by autostatic »

oNNogitaar wrote:

Code: Select all

perl realTimeConfigQuickScan.pl

Code: Select all

Can't open perl script "realTimeConfigQuickScan.pl": No such file or directory
so that is not good?
Perl can't find the .pl file you're trying to open. So no, that's not good. It's been a while I've used the script but maybe the realTimeConfigQuickScan.pl file sits in a subdirectory? You can find that out with:

Code: Select all

find . -name realTimeConfigQuickScan.pl
from within the realtimeconfigquickscan directory.
oNNogitaar wrote:to install the realtime kernel i did:

Code: Select all

sudo apt-add-repository ppa:linux-libre/rt-ppa
sudo apt-get update
sudo apt-get install linux-libre-rt
what is wrong there? should i just try again?
The problem is that the kernel in that package is not a realtime kernel as the one who's built that kernel didn't enable PREEMPT_RT in the kernel config. So even if the PPA is called rt-ppa, the package is called linux-libre-rt and the kernel designation ends with -rtxx it is NOT a realtime kernel. So reinstalling won't help.
tramp
Established Member
Posts: 2348
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 468 times

Re: optimizing firewire settings

Post by tramp »

[quote="oNNogitaar"]

Code: Select all

cd realtimeconfigquickscan
perl realTimeConfigQuickScan.pl
Can't open perl script "realTimeConfigQuickScan.pl": No such file or directory
so that is not good?

you need to use ./ before realTimeConfigQuickScan.pl to set the current path.
perl ./realTimeConfigQuickScan.pl

Code: Select all

perl ./realTimeConfigQuickScan.pl
On the road again.
User avatar
oNNogitaar
Established Member
Posts: 248
Joined: Thu Oct 14, 2010 7:24 pm
Location: Berlin / Amsterdam
Contact:

Re: optimizing firewire settings

Post by oNNogitaar »

Thanks for the help guys!
AutoStatic wrote:You can find that out with:

Code: Select all

find . -name realTimeConfigQuickScan.pl
from within the realtimeconfigquickscan directory.
I do not know how so i seached(nautilus?) "realTimeConfigQuickScan.pl"
under properties it says it is in /home/onno/realtimeconfigquickscan
is that good?
tramp wrote:you need to use ./ before realTimeConfigQuickScan.pl to set the current path.
perl ./realTimeConfigQuickScan.pl

Code: Select all

perl ./realTimeConfigQuickScan.pl
oh, thank you. I dunno how that fell off. Still it is not going:

Code: Select all

Can't open perl script "./realTimeConfigQuickScan.pl": No such file or directory
AutoStatic wrote:The problem is that the kernel in that package is not a realtime kernel
hmm, that is funny. The topic is locked too. Is there an other option?
Thanks!
Post Reply