-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulseaudio gets real-time scheduling error on jack2, but not on jack1 #350
Comments
I also have this same problem on arch with linux-ck. (did not test with default kernel yet) Edit: Also with default kernel... Edit 2: I think reinstalling jack2-dbus solved this for me. |
Nope, for me it was problem of timing. Jack2 needs to be started a little bit before starting pulse, for it to work. |
Hm, I'm seeing the same problem with both jack and jack2 on Arch Linux. |
I'm also seeing the same messages in system logs. My setup is I start jack server with Cadence whenever I want to use it and pulseaudio is successfully routed through jack. According to Cadence logs, jack gets realtime priorirty. My user belongs to
Everything looks fine but for some reason I can also see these messages on the logs, although I think it's not big deal for me. I'm mainly using jack with MIDI and VST instruments. Is there any reason this could affect jack's realtime priority or add more latency while monitoring? |
Further looking into this, this could be a general problem of pulseaudio acquiring realtime. That this error message doesn't appear on jack1 could be due to the fact, that jack1 doesn't have a dbus interface, from which pulseaudio acquires information regarding its realtime use. It might also be an implementational difference between the jack1/jack2 API. I think this should be elaborated upon further with the pulseaudio developers, as there's a bug report for that already on their side, too. |
Fixed with #499 |
@falkTX I still have the issue with jack2 built from the
|
ah damn it. |
If I set Notice that before the JACK fix the I think this is a matter of PulseAudio being strict with its scheduler parameters. I'm honestly not sure which component to blame here. Maybe this has something to do with cgroups? Should this be treated as an end user configuration error equivalent to not having the right stuff in Oh and @terencode, can you see if setting |
Great investigation imaami, this works. |
Glad to hear, and thanks for the original comment! It revealed an interesting corner case to investigate. :) |
Didn't do much but hey ^^ |
@imaami I don't know what changed but it's not working anymore. I just have |
Are you sure you're still running a jack build that has the fix? I got recently hit with this bug again, but it turned out to just be Debian having overwritten my locally-built package with their 1.9.12-based one. Rebuilding from jack2 upstream fixed it. |
I did check that and the verbose log confirm it is the fixed version unfortunately:
|
After more investigation, no matter what |
@terencode Can you please try with this branch? |
@terencode After trying to reproduce your problem I can only come to the conclusion that you have something wrong with your configuration. Without any changes to jackd2 master I can only reproduce if I comment out Are you absolutely sure that you've enabled realtime capabilities for your user? Is the |
Please note that under GNOME, which uses systemd user stuff, the PAM files are ignored. |
Oh boy, dealing with systemd sure does occasionally feel like whatever the opposite of fun is. @terencode How do you start |
@imaami pulseaudio is started automatically by gnome using a systemd user unit and I manually start Jack with Cadence which uses the dbus implementation. |
Aaaaaand I figured out my stupid mistake: I had a @falkTX I think we can finally close this issue. |
ok if you say so |
Hi, I'm getting the same error message with Cadence in Debian 10
|
Hi,
Tl;dr: with a straightforward jack2 install jackd itself gets RT prio fine but generates permissions errors when I set pulseaudio bridge's RT prio; Jack1's jackd successfully sets the bridge's RT prio, and doesn't generate these errors. Seems like a jack2 bug? Details below.
I'm using the distro's jackd2 giving me
jackdmp 1.9.12
I start jackd with
exec /usr/bin/jackd -R -P 95 -u -t 5000000 -d alsa -d hw:USB -p 64 -n 2 -r 48000
and it reports:JACK server starting in realtime mode with priority 95
with no further problems.Then I start
/usr/bin/pulseaudio --high-priority --realtime --verbose --exit-idle-time=85000 --file=./pr.pa -n
(pr.pa
is essentially a copy of the pulse bridge script used bycadence
) and it complains:I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 91.
I: [jack-source] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 87.
I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 91.
W: [pulseaudio] module-jack-source.c: JACK error >Cannot use real-time scheduling (RR/90)(1: Operation not permitted)<
W: [pulseaudio] module-jack-source.c: JACK error >JackClient::AcquireSelfRealTime error<
I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 91.
I: [pulseaudio] module-jack-source.c: Connecting PulseAudio JACK Source:front-left to system:capture_1
(I verified that an error is really being returned from jack causing the bolded JACK errors above, at https://github.com/jackaudio/jack2/blob/master/posix/JackPosixThread.cpp#L237)
If I then kill everything, do
apt-get install libjack0
, changing nothing else, and run the same commands it works without error. I checked the RT prio is actually set and it's not just an ignored error, by looking at htop (RT prios bolded) :4719 user -92 -11 581M 171M 145M S 25 0:03.47 /usr/bin/pulseaudio --high-priority --realtime --verbose --exit-idle-time=85000 --file=./pr.pa -n
4683 user -96 0 213M 63556 45108 S 1.3 0.2 0:04.74 /usr/bin/jackd -R -P 95 -u -t 5000000 -d alsa -d hw:USB -p 64 -n 2 -r 48000 `
The pulseaudio output is:
uname -a is
Linux monstro 4.15.0-041500-lowlatency #201802011154 SMP PREEMPT Thu Feb 1 11:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
So, since jackd1 and its lib don't give me this error and just swapping to jackd2 does give me the error, it looks like a bug in jackd2. Is this correct?
The text was updated successfully, but these errors were encountered: