jackaudio / jack2

jack2 codebase
GNU General Public License v2.0
2.22k stars 376 forks source link

Cannot connect to jack2 master on Windows host from a slave on Linux guest #336

Open michojel opened 6 years ago

michojel commented 6 years ago

Hello,

I followed this article to setup jack master on Window 8.1 64bit and this to connect it with a slave running on Linux (also 64bit).

Host and guest are connected using VirtualBox host-only internet adapter with static IP addresses. I can ping the other from both directions. And for the sake of getting this work, I've disabled windows firewall.

I'm running the jackd (1.9.11) master on Windows host as an administrator like this:

λ "C:\Program Files (x86)\Jack\jackd.exe" -R -S -d portaudio
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Drivers/internals found in : C:\Windows
Drivers/internals found in : C:\Windows
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Starting Jack NetManager
Listening on '225.3.19.154:19000'

The last two lines come up after running:

netmanager is running.
client name = netmanager

On the Linux guest I run jackd -R -d net in systemd with the following output:

Mar 31 19:00:43 nixosmounter.vm systemd[1]: Started Jack slave.
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Cannot create RT messagebuffer thread: Operation not permitted (1)
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Retrying messagebuffer thread without RT scheduling
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Messagebuffer not realtime; consider enabling RT scheduling for user
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: no message buffer overruns
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Cannot create RT messagebuffer thread: Operation not permitted (1)
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Retrying messagebuffer thread without RT scheduling
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Messagebuffer not realtime; consider enabling RT scheduling for user
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: no message buffer overruns
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Cannot create RT messagebuffer thread: Operation not permitted (1)
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Retrying messagebuffer thread without RT scheduling
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Messagebuffer not realtime; consider enabling RT scheduling for user
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: no message buffer overruns
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: jackdmp 1.9.12
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Copyright 2001-2005 Paul Davis and others.
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Copyright 2004-2016 Grame.
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Copyright 2016-2017 Filipe Coelho.
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: jackdmp comes with ABSOLUTELY NO WARRANTY
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: This is free software, and you are welcome to redistribute it
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: under certain conditions; see the file COPYING for details
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: JACK server starting in realtime mode with priority 10
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: self-connect-mode is "Don't restrict self connect requests"
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: AcquireSelfRealTime error
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: NetDriver started in async mode without Master's transport sync.
Mar 31 19:00:43 nixosmounter.vm jackd[30624]: Waiting for a master...
Mar 31 19:00:45 nixosmounter.vm jackd[30624]: JackTimedDriver::Process XRun = 17 usec
Mar 31 19:00:46 nixosmounter.vm jackd[30624]: JackTimedDriver::Process XRun = 8 usec
Mar 31 19:00:46 nixosmounter.vm jackd[30624]: JackTimedDriver::Process XRun = 10 usec

Not sure how serius the error Cannot create RT messagebuffer thread: Operation not permitted (1) is. The server is running though. I'm able to get rid of this error by running jackd is root -- the outcome is the same though.

Nevertheless the console output of jackd on windows master is unaffected. And in the Jack Control I can see only system windows clients.

I'd be glad for any suggestion you may have. Thank you in advance.

cdhowie commented 5 years ago

I have the same issue on Windows and it appears to be related to a Windows-specific network oddity that I haven't pinned down exactly. For example, disabling the Windows firewall doesn't even correct the problem. I did verify in Wireshark that the multicast packets from the slave were reaching the master, but it didn't look like they were being delivered to the jackd process.

I resolved it by not using multicast on the slave (jackd -R -d net -a $MASTER_IP).

pawelurbanski commented 3 years ago
  Hi Everyone,
  I would like to follow up on this thread for I have a similar issue with JACK on Windows Subsystem for Linux.
  Currently:
  1. JACK start on windows and jack_simple_client generates the sound played with the windows speakers.
  2. I've configured pulseaudio to load module-jack-sink and module-jack-source and they are loaded.
  3. jackd default server is launched on my Linux virtual machine.

  Here is the output of jack_lsp for Linux:
  Cannot lock down 82280346 byte memory area (Cannot allocate memory)
  PulseAudio JACK Sink:front-left
  PulseAudio JACK Sink:front-right
  PulseAudio JACK Source:front-left
  PulseAudio JACK Source:front-right
  netadapter:capture_1
  netadapter:capture_2
  netadapter:playback_1
  netadapter:playback_2

  Here is the output of jack_lsp on Windows:
  system:capture_1
  system:capture_2
  system:playback_1
  system:playback_2
  When I call: jack_simple_client on Linux there is no sound. Testing playing the file with: mpv --ao=jack test.wav show output with the file playing - its metadata and percentage durations.

  I cannot run: jackd -r -d net -a with the IP address for the server is already started. I guess, I need pulseaudio integration for this virtual machine has no card.

  Any hints will be appriciated.

  Best, Pawel