pyo server cannot start

196 views
Skip to first unread message

p.s...@outlook.com

unread,
Apr 5, 2021, 5:32:49 PM4/5/21
to pyo-discuss
Hello,

Starting a new thread as, well, this is all new. I've got a fresh install of UbuntoStudio 20.10, pyo1.0.3. Trying to get a pyo server running with the following script:

from pyo64 import *

bufferSize = 128
sampleRate = 48000
pyoServer = Server(sr=sampleRate, nchnls=2, buffersize=bufferSize, duplex=1, audio="jack", ichnls=2)
pyoServer.setJackAutoConnectInputPorts([['system:capture_1'],['system:capture_2']])
pyoServer.setJackAutoConnectOutputPorts([['system:playback_1','system:playback_3'],['system:playback_2','system:playback_4']])
pyoServer.setVerbosity(8)
pyoServer.boot()
pyoServer.start()


You can ignore the JackAutoConnect bits, this happens with or without those.

Error is:

Pyo debug: Streams list size at Server boot (must always be 0) = 0
Cannot read socket fd = 3 err = Success
CheckRes error
Could not read result type = 22
Client name = pyo conflits with another running client
Cannot connect to the server
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_modu
le_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
Pyo debug: Portmidi initialized.
Pyo debug: Portmidi number of devices: 0.


I'm running QJackCtl, Alsa driver in realtime, D-Bus enabled. When I start Qjackctl, Pulseaudio Jack Sink starts up. That directory /usr/lib/alsa-lib/ doesn't exist, which could be a core issue, but I'm wary of making big changes to Alsa without consulting here first (and I can't find a really definitive answer on that issue itself online).

Thanks,
Paul

p.s...@outlook.com

unread,
Apr 5, 2021, 6:27:55 PM4/5/21
to pyo-discuss
The folder alsa-lib is in /usr/lib/i386-linux-gnu/ and /usr/lib/x86_64-linux-gnu/, not just /usr/lib/. So something seems to be telling it to look in the wrong place. But I can't work out any more than that. This might be outside the realm of this forum to discuss. The laptop is 32-bit, by the way, and I installed libasound2-plugins:i386.

An aside, if solving this issue remains difficult: I'm getting frustrated, I have working code ready to play music on and a laptop to do it with no commitment to its OS. If anyone can recommend a Linux distribution they successfully ran pyo with jack on straight away, I'd welcome it. I expected Ubuntu Studio to play nicely, but it seems to not be.

Olivier Bélanger

unread,
Apr 5, 2021, 8:57:46 PM4/5/21
to pyo-d...@googlegroups.com
Hi Paul,

On Mon, Apr 5, 2021 at 6:27 PM p.s...@outlook.com <p.s...@outlook.com> wrote:
The folder alsa-lib is in /usr/lib/i386-linux-gnu/ and /usr/lib/x86_64-linux-gnu/, not just /usr/lib/.

Same here on Debian. I doubt that's the problem...
 
So something seems to be telling it to look in the wrong place. But I can't work out any more than that. This might be outside the realm of this forum to discuss. The laptop is 32-bit, by the way, and I installed libasound2-plugins:i386.

An aside, if solving this issue remains difficult: I'm getting frustrated, I have working code ready to play music on and a laptop to do it with no commitment to its OS. If anyone can recommend a Linux distribution they successfully ran pyo with jack on straight away, I'd welcome it. I expected Ubuntu Studio to play nicely, but it seems to not be.

Never had much luck with Ubuntu Studio (it's been a while thought), it created more problems than it solved... I guess you best bet is Debian, after all, pyo is mainly developed on Debian! But I know it's also working great on Arch and Fedora...

Olivier
 
--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyo-discuss/834d14e1-fee2-4797-811f-9f8c83ed2a6bn%40googlegroups.com.

p.s...@outlook.com

unread,
Apr 6, 2021, 9:35:36 AM4/6/21
to pyo-discuss
Thanks Olivier. On Fedora, similar error, no alsa involvement though. From gdb (using -X dev outputs no more information):

Pyo debug: Streams list size at Server boot (must always be 0) = 0
[New Thread 0x7fffe71c9640 (LWP 7010)]
Cannot read socket fd = 3 err = Success
CheckRes error
Could not read result type = 22
Client name = pyo conflits with another running client
Cannot connect to the server
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[Thread 0x7fffe71c9640 (LWP 7010) exited]
Pyo debug: Portmidi initialized.
Pyo debug: Portmidi number of devices: 3.
Pyo debug: Midi input device : 1.
Pyo debug: Midi input (Midi Through Port-0) opened.
Pyo debug: Midi output device : 0.
Pyo debug: Midi output (Midi Through Port-0) opened.
[Inferior 1 (process 7008) exited normally]


Much here is the same errors.

Olivier Bélanger

unread,
Apr 6, 2021, 9:54:10 AM4/6/21
to pyo-d...@googlegroups.com
Hi Paul,

"
Client name = pyo conflits with another running client
"

That's weird... Can you try with another jack name, something like:

s = Server(audio="jack", jackname="pyo2").boot()

Olivier


p.s...@outlook.com

unread,
Apr 6, 2021, 3:12:22 PM4/6/21
to pyo-discuss
Same issue regardless name.

I'm looking up the "conflits with another running client" error and it seems to be mentioned a few times since last year, but kinda scattered. I wonder if I could uninstall something and use an older version? But I'm not sure what. jack2?


This is the only mention of the same error with Fedora, but I'm not sure how much it's related: https://ask.csdn.net/questions/1685788

Best,
Paul

Olivier Bélanger

unread,
Apr 6, 2021, 4:18:40 PM4/6/21
to pyo-d...@googlegroups.com
I've been using jack2 for years now without any issues... Pyo is built against jackd2 on linux:


Olivier




p.s...@outlook.com

unread,
Apr 6, 2021, 4:27:01 PM4/6/21
to pyo-discuss
Here's the messages log on Qjackctl when I try to run the script:

Jack: JackSocketServerChannel::ClientCreate socket

Jack: JackSocketServerChannel::BuildPoolTable size = 4

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 1 fd = 20

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 2 fd = 21

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 3 fd = 24

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Jack: JackSocketServerChannel::Execute : poll client error err = Success

Jack: JackSocketServerChannel::ClientKill ref = -1 fd = 24

Jack: Client was not opened : probably correspond to server_check

Jack: JackClientSocket::Close

Jack: JackSocketServerChannel::BuildPoolTable size = 3

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 1 fd = 20

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::ClientCreate socket

Jack: JackSocketServerChannel::BuildPoolTable size = 4

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 1 fd = 20

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 2 fd = 21

Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 3 fd = 24

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Jack: JackRequest::ClientCheck

CheckSize error size = 81 Size() = 85

CheckRead error

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 104

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 2048

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 0

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 4294967040

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Unknown request 511

Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 20

Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 21

Jack: JackSocketServerChannel::Execute : fPollTable i = 3 fd = 24

Cannot read socket fd = 24 err = Success

Jack: JackSocketServerChannel::Execute : cannot decode header

Jack: JackSocketServerChannel::ClientKill ref = -1 fd = 24

Jack: Client was not opened : probably correspond to server_check

Jack: JackClientSocket::Close

p.s...@outlook.com

unread,
Apr 6, 2021, 8:32:09 PM4/6/21
to pyo-discuss
All my attention on this is in brief spurts at the moment -

I installed pyo1.0.1 on Python3.7. It seems to work fine. I have verbosity at 8 and so got these messages, but I think they're okay as I was able to output a Sine wave from the terminal. Just adding them for fullness. I'll check 1.0.2 in a bit, see if I can spot where the jack problem starts.

>>> s = Server(audio="jack").boot()
Cannot lock down 107341338 byte memory area (Cannot allocate memory)
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_pyo
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = pyo refnum = 3
Pyo warning: Sample rate set to Jack engine sample rate: 48000.
Pyo warning: Buffer size set to Jack engine buffer size: 128.
Jack: JackClient::PortRegister ref = 3 name = pyo:input_1 type = 32 bit float mono audio port_index = 15
Jack: JackClient::PortRegister ref = 3 name = pyo:input_2 type = 32 bit float mono audio port_index = 16
Jack: JackClient::PortRegister ref = 3 name = pyo:output_1 type = 32 bit float mono audio port_index = 17
Jack: JackClient::PortRegister ref = 3 name = pyo:output_2 type = 32 bit float mono audio port_index = 18
Jack: JackClient::Activate
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackClient::kBufferSizeCallback buffer_size = 128
Jack: JackClient::Init : period = 2666 computation = 300 constraint = 2666
Jack: JackPosixThread::AcquireRealTimeImp priority = 15
Jack: pthread_setschedparam() failed (1), trying with SCHED_RESET_ON_FORK.
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 2
Jack: JackClient::kActivateClient name = pyo ref = 3  
Jack: JackClient::Connect src = system:capture_1 dst = pyo:input_1
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::Connect src = system:capture_2 dst = pyo:input_2
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::Connect src = pyo:output_1 dst = system:playback_1
Jack: JackClient::Connect src = pyo:output_2 dst = system:playback_2
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18
Jack: JackClient::ClientNotify ref = 3 name = pyo notify = 18

p.s...@outlook.com

unread,
Apr 6, 2021, 9:01:58 PM4/6/21
to pyo-discuss
Okay! pyo1.0.2 fails with the same error as before; pyo1.0.1 works as described above. So it's an issue pyo1.0.2 onwards. That's I think as far as I can go here, I'm not sure what changed between those versions.

I'll use 1.0.1 for now. Will let you know if I encounter more errors, and maybe others can test if there are similar problems with jack on their versions 1.0.2+. Of course, eventually I want to make use of the improvement to Select that you made for me!

Thanks for everything,
Paul

serge....@gmail.com

unread,
Apr 7, 2021, 6:08:55 AM4/7/21
to pyo-discuss
Hi everybody,

   I encounter a crash problem with pyo 1.0.2+ and ubuntu 20.04 or 18.04 (see the thread "pyo 1.0.3 crashing simple example"
some time ago in pyo-discuss). Everything works (very!) fine with pyo 1.0.1, but there seems to be some incompatibility of pyo1.0.2
with ubuntu... However on my machine(s) jack starts without problem. The crash occurs later, when using "server shutdown".

Hope this helps.
   Serge.

Olivier Bélanger

unread,
Apr 8, 2021, 5:42:50 AM4/8/21
to pyo-d...@googlegroups.com
Ok, I'll see what has changed in the jack backend between 1.0.1 and 1.0.2. I guess I'll have to set up an Ubuntu VM :)

Paul, did you try with jack2? I can't see any reason to stick to jack1 nowadays...

Olivier


p.s...@outlook.com

unread,
Apr 8, 2021, 11:11:08 AM4/8/21
to pyo-discuss
Thanks so much. Yes, sorry, when I said jack I meant jack2.

So you know which distros I was using: the original problem reported last month (segfaulting) was on a 2017 install of AVLinux (there may have been other problems involved there, as I said, I broke some other areas of the audio pipeline over a few years of fumbling through this stuff). I then tried Ubuntu Studio (failed with "conflits...", additionally with the alsa error) and Fedora Jam (failed with "conflits...").

Best,
Paul

p.s...@outlook.com

unread,
Apr 28, 2021, 1:33:04 AM4/28/21
to pyo-discuss
Hi Olivier,

Any luck so far isolating the problem? I don't ask this to rush you - I just want to find out if I should work on an alternative implementation for the part of my program that will need the update, for the time being.

Thanks,
Paul

Ben Niemann

unread,
Jan 1, 2022, 7:42:16 AM1/1/22
to pyo-discuss
Hello everyone,

I'm not using pyo, but I encountered the same issue with jack in a different context (bundling my app in an appimage and then testing it in a VM), which is how I found this thread.

I did a quick 'pip install pyo' and 's = Server(audio="jack", jackname="pyo2").boot()' seems to work fine (ubuntu 20.04).

But I did notice that pyo comes with its own version of libjack.so. I did the same with my appimage, but that seems to be the root of the problem. Apparently libjack.so has to be the exact same version as jackd, i.e. you should always use the libjack.so, which is installed on the system. At least that's what this comment says: https://musescore.org/en/node/105361#comment-783841

HTH,
-Ben
Reply all
Reply to author
Forward
0 new messages