Page 1 of 1

JACK and PULSEAUDIO problems after Linux Mint upgrade [SOLVED]

Posted: Tue Jul 27, 2021 12:12 pm
by UncleOilybag
I have 2 computers- a laptop running Linux Mint 19.3 and a desktop running Mint 20.2 - and on both of them I managed to get ALSA/PULSEAUDIO/JACK all working in perfect harmony by basically following the instructions in https://www.youtube.com/watch?v=EoN0GLYhAzk&t=45s which basically uses KXStudio (Cadence).
Then - I decided to upgrade my Mint 19.3 to 20.2 on my laptop.
All seemed to be going well - yes, I had to remove the KX PPAs but they were easily put back in. Again I set up as per the YouTube instructions but on re-boot I am having big problems.
JACK (through Cadence) fails to start - ther error message I get is something like:-

Mon Jul 26 16:43:31 2021: ERROR: Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Mon Jul 26 16:43:32 2021: Acquired audio card Audio0
Mon Jul 26 16:43:32 2021: creating alsa driver ... hw:0|hw:0|512|2|48000|0|0|nomon|swmeter|-|32bit
Mon Jul 26 16:43:32 2021: ERROR:

ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again

Mon Jul 26 16:43:32 2021: Released audio card Audio0
Mon Jul 26 16:43:32 2021: ERROR: Cannot initialize driver
Mon Jul 26 16:43:32 2021: ERROR: JackServer::Open failed with -1
Mon Jul 26 16:43:32 2021: ERROR: Failed to open server

Note this hs happening after login - and before I have opened any other programs.
After hours of searching I have found a "workaround" which is - completely re load ALSA with
sudo alsa force-reload
then use Cadence to restart Jack.
But I have to do this every time I boot up computer.
It 'feels' like pulseaudio and jack are competing at start up - but I can't see where this is different from my desktop computer which doesn't need this 'workaround'
Please could somebody point me in the right direction - is it some config file somewhere I need to alter?

Re: JACK and PULSEAUDIO problems after Linux Mint upgrade

Posted: Tue Jul 27, 2021 1:26 pm
by sysrqer
Have you got the pulseaudio-module-jack installed? You might also need to update the pulseaudio config:

Edit (or uncomment) /etc/pulse/default.pa file to include two lines under the load audio drivers manually section:

load-module module-jack-sink
load-module module-jack-source

Re: JACK and PULSEAUDIO problems after Linux Mint upgrade

Posted: Tue Jul 27, 2021 4:41 pm
by UncleOilybag
Thanks for your input - I'll have a look @ /etc/pulse/default.pa and compare my two computers.

I have solved ther problem - I was wrong to implicate pulseaudio as a culprit which stopped Jack from grabbing the playback device - in fact it was the timidy demon

I actually don't use timidity now ( I used to) - for my MIDI stuff I use Qsynth

So entering this with a reboot solved my problem:-

sudo apt purge timidity-daemon

Thank you :)

Re: JACK and PULSEAUDIO problems after Linux Mint upgrade [SOLVED]

Posted: Tue Jul 27, 2021 5:19 pm
by sysrqer
Oh that's interesting, I haven't heard of that causing a problem before. Glad you got it sorted out.

Re: JACK and PULSEAUDIO problems after Linux Mint upgrade [SOLVED]

Posted: Wed Jul 28, 2021 7:25 am
by sunrat
Wow, I've heard a few reports of that timidity issue but last one was maybe 2 years ago so I thought it was fixed. Didn't even consider it might still be happening. Good you got it sorted!