[Jack-Devel] Usage feasibility Q

classic Classic list List threaded Threaded
60 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
> On Tue, January 30, 2018 11:45 am, Robert Bielik wrote:
> > Thanks, I thought it would something like that, Ok I'll have to figure out
> > how to do it on Raspbian.
>
> I am running stock debian stable on a BeagleBone Black and it has a
> /etc/security/limits.conf file, but all entries are commented by default.
> Perhaps you just need to add the settings described in the RT tuning FAQ
> to your limits.conf file for the pi user account.

Yes, I managed to get it working with that guide, however now I have intermittent problems when rebooting, I think it is due to the LD cache, sometimes .so files in /usr/local/lib are not found.

But using aplay direcly works fine now 😊

Two steps forward, one step back.

/R

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
> Yes, I managed to get it working with that guide, however now I have
> intermittent problems when rebooting, I think it is due to the LD cache,
> sometimes .so files in /usr/local/lib are not found.

In these cases, when it doesn't work I get:

Could not open driver directory /usr/lib/arm-linux-gnueabihf/jack: No such file or directory
Could not find any drivers in driver directory!
Failed to create server object

So I do:
sudo ldconfig /usr/local/lib/

and voila, it works again. As you probably can tell, Linux is not my forte...

Regards
/R
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Chris Caudle
On Tue, January 30, 2018 1:22 pm, Robert Bielik wrote:
> So I do:
> sudo ldconfig /usr/local/lib/

I don't think that /usr/local/lib is usually in the default search path.
This is from my ARM Debian board:
$ less /etc/ld.so.conf.d/arm-linux-gnueabihf.conf
# Multiarch support
/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf

I think if you edit that conf file to include
/usr/local/lib/arm-linux-gnueabihf then the local/lib directory will be
searched at the next reboot.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
Thank you all for the responses!

I have now a working architecture pretty much exactly what I set out for. I can now start implementing the DSP in a jack client 😊

Regards
/Robert

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
> I have now a working architecture pretty much exactly what I set out for. I
> can now start implementing the DSP in a jack client 😊

Hmm... that said, I've now encountered a weird problem, when I startup the Pi from powered-down state (jack is started in /etc/rc.local with user "pi"), log in via putty I can access the jack server with jack_lsp f.i.

Then I quit putty, and after a while log in again and try jack_lsp, then I get:

pi@realtimepi:~ $ jack_lsp -c
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

The server is still running, because I can hear the streaming of audio, and ps -A lists it. What gives ?

I've documented how the setup looks here http://forum.audioinjector.net/viewtopic.php?f=5&t=2727&e=1&view=unread#p5749

Regards
/Robert
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

David Kastrup
Robert Bielik <[hidden email]> writes:

>> I have now a working architecture pretty much exactly what I set out for. I
>> can now start implementing the DSP in a jack client 😊
>
> Hmm... that said, I've now encountered a weird problem, when I startup
> the Pi from powered-down state (jack is started in /etc/rc.local with
> user "pi"), log in via putty I can access the jack server with
> jack_lsp f.i.
>
> Then I quit putty, and after a while log in again and try jack_lsp, then I get:
>
> pi@realtimepi:~ $ jack_lsp -c
> Cannot connect to server socket err = No such file or directory
> Cannot connect to server request channel
> jack server is not running or cannot be started
> JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
>
> The server is still running, because I can hear the streaming of
> audio, and ps -A lists it. What gives ?

Socket is associated with the desktop session?

--
David Kastrup
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
Hi David,

> > The server is still running, because I can hear the streaming of
> > audio, and ps -A lists it. What gives ?
>
> Socket is associated with the desktop session?

Ah, seems like a very reasonable explanation. Although I'm not nearly linux-savvy enough to "fix" this, so I'd appreciate pointers 😊

All the best,
/Robert
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

David Kastrup
Robert Bielik <[hidden email]> writes:

> Hi David,
>
>> > The server is still running, because I can hear the streaming of
>> > audio, and ps -A lists it. What gives ?
>>
>> Socket is associated with the desktop session?
>
> Ah, seems like a very reasonable explanation. Although I'm not nearly
> linux-savvy enough to "fix" this, so I'd appreciate pointers 😊

I'm just regurgitating buzzwords connected to "dbus".  Maybe they help
trigger the memory of someone who actually has a clue.

--
David Kastrup
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
> >> Socket is associated with the desktop session?
> >
> > Ah, seems like a very reasonable explanation. Although I'm not nearly
> > linux-savvy enough to "fix" this, so I'd appreciate pointers 😊
>
> I'm just regurgitating buzzwords connected to "dbus".  Maybe they help
> trigger the memory of someone who actually has a clue.

Ok 😊 although this is jack2 built *without* dbus and running on a headless RPi3.

Regards
/R
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Usage feasibility Q

Ralf Mattes
 
Am Mittwoch, 31. Januar 2018 16:03 CET, Robert Bielik <[hidden email]> schrieb:
 
> > >> Socket is associated with the desktop session?
> > >
> > > Ah, seems like a very reasonable explanation. Although I'm not nearly
> > > linux-savvy enough to "fix" this, so I'd appreciate pointers οΏ½οΏ½
> >
> > I'm just regurgitating buzzwords connected to "dbus".  Maybe they help
> > trigger the memory of someone who actually has a clue.
>
> Ok οΏ½οΏ½ although this is jack2 built *without* dbus and running on a headless RPi3.

Yes, D-Bus is only one part of Linux session handling. Both systemd (most likely your init system) and PAM
will do some magic. To find out where your jack client expexts jackd's socket run:

  $ strace -e connect,open  jack_lsp -c > /dev/null

Cheers, RalfD

 
 
 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robin Gareus
In reply to this post by Chris Caudle
On 01/30/2018 08:13 PM, Chris Caudle wrote:
> On Tue, January 30, 2018 11:45 am, Robert Bielik wrote:
>> Thanks, I thought it would something like that, Ok I'll have to figure out
>> how to do it on Raspbian.
>
> I am running stock debian

debian asks when installing jack (unless you install it
non-interactively). You can later change it:

  sudo dpkg-reconfigure -p high jackd2

say "yes, enable realtime priority" which will update
/etc/security/limits.d/audio.conf , then re-login.

ciao,
robin
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Chris Caudle
In reply to this post by Robert Bielik
On Wed, January 31, 2018 9:03 am, Robert Bielik wrote:
> Ok 😊 although this is jack2 built *without* dbus and running on a
> headless RPi3.

How does the rc.local start jackd under the user account?  Maybe it could
start a screen session at that point, and when you ssh in you can connect
to the screen session.  If you are not familiar with screen it is an
application that (among other features) will let you disconnect an ssh
session while the underlying terminal session continues to run (usually
breaking the ssh session will kill the terminal session associated with
that login).  When you connect again with ssh you start screen with the -r
argument to restore connection to the already running screen session
rather than starting a new session.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
> How does the rc.local start jackd under the user account?  Maybe it could
> start a screen session at that point, and when you ssh in you can connect
> to the screen session.  If you are not familiar with screen it is an
> application that (among other features) will let you disconnect an ssh
> session while the underlying terminal session continues to run (usually
> breaking the ssh session will kill the terminal session associated with
> that login).  When you connect again with ssh you start screen with the -r
> argument to restore connection to the already running screen session
> rather than starting a new session.

As shown here (I wrote that msg in the forum): http://forum.audioinjector.net/viewtopic.php?f=5&t=2727&e=1&view=unread#p5749

sudo runuser -u pi -- /home/pi/start_jack

And right now everything works, strace gives me:
...
connect(3, {sa_family=AF_UNIX, sun_path="/dev/shm/jack_default_1000_0"}, 110) = 0
...

And jack_lsp works as expected. Contents in /dev/shm:
pi@realtimepi:~ $ ls -al /dev/shm/
total 69804
drwxrwxrwt  2 root root      160 Jan 31 15:24 .
drwxr-xr-x 14 root root     3300 Jan 31 15:19 ..
-rw-r--r--  1 pi   pi   71390368 Jan 31 15:22 jack-1000-0
-rw-r--r--  1 pi   pi       1240 Jan 31 15:22 jack-1000-1
srwxr-xr-x  1 pi   pi          0 Jan 31 15:22 jack_default_1000_0
-rwxr-xr-x  1 pi   pi         12 Jan 31 15:22 jack_sem.1000_default_freewheel
-rwxr-xr-x  1 pi   pi         12 Jan 31 15:22 jack_sem.1000_default_system
-rw-rw-rw-  1 pi   pi      70744 Jan 31 15:22 jack-shm-registry

When it is not working, the "jack_default_1000_0" file does not exist anymore, but the jackd server is running.

I'll lookup the screen option, although this feels like more fundametal problem. The files in /dev/shm aren't supposed to vanish during lifetime of jackd process, right ?

Regards
/Robert
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Usage feasibility Q

Ralf Mattes
In reply to this post by Chris Caudle
 
Am Mittwoch, 31. Januar 2018 16:24 CET, "Chris Caudle" <[hidden email]> schrieb:
 
> On Wed, January 31, 2018 9:03 am, Robert Bielik wrote:
> > Ok 😊 although this is jack2 built *without* dbus and running on a
> > headless RPi3.
>
> How does the rc.local start jackd under the user account?  Maybe it could
> start a screen session at that point, and when you ssh in you can connect
> to the screen session.  

But the OP clearly stated that it worked during a ssh login. It's only later
on that it stops working.

Cheers, RalfD


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
In reply to this post by Robert Bielik
> I'll lookup the screen option, although this feels like more fundametal
> problem. The files in /dev/shm aren't supposed to vanish during lifetime of
> jackd process, right ?

Ok, when logging out of all ssh sessions, the contents of /dev/shm seems to vanish, at least it cannot be seen in the newly attached ssh session.

But df -h shows that the jackd process still holds the 69MB it had allocated:

pi@realtimepi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  1.6G   26G   6% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           160M   69M   92M  43% /dev/shm <<<<<<<<
tmpfs           464M   12M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   41M   35M  6.8M  84% /boot
tmpfs            93M     0   93M   0% /run/user/1000

Regards
/Robert

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Chris Caudle
In reply to this post by Ralf Mattes
On Wed, January 31, 2018 9:33 am, Ralf Mattes wrote:
> But the OP clearly stated that it worked during a ssh login. It's only
> later on that it stops working.

It works during the first ssh login, but not during subsequent logins.
Screen would avoid that issue by never really closing down the user
session.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Usage feasibility Q

Ralf Mattes
 
Am Mittwoch, 31. Januar 2018 16:47 CET, "Chris Caudle" <[hidden email]> schrieb:
 
> On Wed, January 31, 2018 9:33 am, Ralf Mattes wrote:
> > But the OP clearly stated that it worked during a ssh login. It's only
> > later on that it stops working.
>
> It works during the first ssh login, but not during subsequent logins.
> Screen would avoid that issue by never really closing down the user
> session.

Only if the assumption that the logout triggers socket removal is true (it might
as well be something that happens after a certain time etc.).
And even then I might be a "smarter idea" to fix that buggy behavior instead of
duct-tapeing the problem.

 Cheers, RalfD

>
> --
> Chris Caudle
>
>
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
 
 
 
 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Usage feasibility Q

Ralf Mattes
In reply to this post by Robert Bielik
 BTW, do a:

 $  lsof -p `pgrep jackdbus ` | grep log

If you are lucky your jackd logs to a logfile and you might be able to find out what happened.

 Cheers, RalfD




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Usage feasibility Q

Robert Bielik
>  $  lsof -p `pgrep jackdbus ` | grep log

Output of lsof -p `pgrep jackd`   (I don't have jackdbus):
pi@realtimepi:~ $ lsof -p `pgrep jackd`
COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF   NODE NAME
jackd   578   pi  cwd    DIR      179,2     4096      2 /
jackd   578   pi  rtd    DIR      179,2     4096      2 /
jackd   578   pi  txt    REG      179,2    34080  42764 /usr/local/bin/jackd
jackd   578   pi  mem    REG      179,2   168156 254843 /usr/local/lib/jack/jack_alsa.so
jackd   578   pi  DEL    REG       0,16           11508 /dev/shm/jack-1000-0
jackd   578   pi  mem    REG      179,2   902752  10550 /usr/lib/arm-linux-gnueabihf/libasound.so.2.0.0
jackd   578   pi  DEL    REG       0,16           11507 /dev/shm/jack-shm-registry
jackd   578   pi  mem    REG      179,2  1234700   1887 /lib/arm-linux-gnueabihf/libc-2.24.so
jackd   578   pi  mem    REG      179,2   116372   1902 /lib/arm-linux-gnueabihf/libgcc_s.so.1
jackd   578   pi  mem    REG      179,2   452152   1914 /lib/arm-linux-gnueabihf/libm-2.24.so
jackd   578   pi  mem    REG      179,2  1269620  10687 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.22
jackd   578   pi  mem    REG      179,2     9800   1896 /lib/arm-linux-gnueabihf/libdl-2.24.so
jackd   578   pi  mem    REG      179,2    26632   1952 /lib/arm-linux-gnueabihf/librt-2.24.so
jackd   578   pi  mem    REG      179,2   127300   1948 /lib/arm-linux-gnueabihf/libpthread-2.24.so
jackd   578   pi  mem    REG      179,2  1241196  40853 /usr/local/lib/libjackserver.so.0.1.0
jackd   578   pi  mem    REG      179,2    21868  10548 /usr/lib/arm-linux-gnueabihf/libarmmem.so
jackd   578   pi  mem    REG      179,2   138576   1840 /lib/arm-linux-gnueabihf/ld-2.24.so
jackd   578   pi  DEL    REG       0,16            8034 /dev/shm/jack_sem.1000_default_freewheel
jackd   578   pi  mem    CHR     116,16           11413 /dev/snd/pcmC0D0p
jackd   578   pi  mem    CHR     116,24           11414 /dev/snd/pcmC0D0c
jackd   578   pi  DEL    REG       0,16           11510 /dev/shm/jack_sem.1000_default_system
jackd   578   pi  DEL    REG       0,16           11509 /dev/shm/jack-1000-1
jackd   578   pi    0r   CHR        1,3      0t0   1028 /dev/null
jackd   578   pi    1w   CHR        5,1      0t0   1035 /dev/console
jackd   578   pi    2u  unix 0xb6447480      0t0  10734 type=STREAM
jackd   578   pi    3u   REG       0,16       12  11510 /dev/shm/jack_sem.1000_default_system (deleted)
jackd   578   pi    4u   CHR      116,0      0t0  11412 /dev/snd/controlC0
jackd   578   pi    5u  unix 0xb78a4380      0t0   8031 /dev/shm/jack_default_1000_0 type=STREAM
jackd   578   pi    6u   CHR     116,16      0t0  11413 /dev/snd/pcmC0D0p
jackd   578   pi    7u   CHR     116,24      0t0  11414 /dev/snd/pcmC0D0c
jackd   578   pi    8u  unix 0xb78a7b80      0t0   8033 type=STREAM
jackd   578   pi    9u   REG       0,16       12   8034 /dev/shm/jack_sem.1000_default_freewheel (deleted)
jackd   578   pi   10u  unix 0xb78a7800      0t0  11511 /dev/shm/jack_default_1000_0 type=STREAM

Interesting to see the DEL for file descriptor.

> If you are lucky your jackd logs to a logfile and you might be able to find out
> what happened.

I'll search for a log file.

Regards
/Robert
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Usage feasibility Q

Ralf Mattes
 
Am Mittwoch, 31. Januar 2018 17:07 CET, Robert Bielik <[hidden email]> schrieb:
 

> >  $  lsof -p `pgrep jackdbus ` | grep log
>
> Output of lsof -p `pgrep jackd`   (I don't have jackdbus):
> pi@realtimepi:~ $ lsof -p `pgrep jackd`
> COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF   NODE NAME
> jackd   578   pi  cwd    DIR      179,2     4096      2 /
> [...]
> jackd   578   pi   10u  unix 0xb78a7800      0t0  11511 /dev/shm/jack_default_1000_0 type=STREAM
>
> Interesting to see the DEL for file descriptor.
>

>
> I'll search for a log file.

That's what the '| grep log' was meant for ;-)
Looks like you don't have one. Maybe you can append '> /tmp/jackd.log 2>&1 ' to your jackd invocation
in your '/home/pi/start_jack' script?

 Cheers, RalfD


>
> Regards
> /Robert
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
 
 
 
 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
123