LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2019, 11:06 AM   #1
The Sego Sago Kid
Member
 
Registered: Feb 2015
Location: PA USA
Distribution: Slackware
Posts: 46

Rep: Reputation: Disabled
JACK is driving me insane


I'm using JACK to record music (mic'd guitars and such) through Ardour (v 5.12) on Slackware (v 14.2). Here's what I normally do when I get started:

1. Open the Pulse Audio Mixer > Configuration Tab > set the Built-in Audio profile to "Off" (if I don't do this, JACK usually doesn't start since it says the audio device is in use or some such thing)

2. Open QjackCtl > Start. JACK starts and reports the same message every time, whether recording works or not--

Code:
JACK MIDI <-> ALSA sequencer MIDI bridge, version 7 (b169fb6b8e9e11ce1488d1964649aabedbb89ddf) built on Wed Dec 31 19:00:00 1969
Copyright 2006,2007 Dmitry S. Baikov
Copyright 2007,2008,2009,2011 Nedko Arnaudov
Bridge starting...
Using JACK server 'default'
Hardware ports will be exported.
cannot lock down memory for RT thread (Cannot allocate memory)
cannot use real-time scheduling (FIFO at priority 5) [for thread -1284671744, from thread -1284671744] (1: Operation not permitted)
Bridge started
Press ctrl-c to stop the bridge
3. I open my Ardour project, change the input on my track to Input 2, and record

Recently however, this three step process has stopped working 9/10 times. The 10th time, it works randomly after restarting JACK, rebooting, praying, blood sacrifice, etc.

When I say it doesn't work, what I mean is that on both Audio In 1 and 2 in Ardour, I get only extremely crunchy, awful sound and only when I blow into or tap the mic, like it's just bleedthrough.

I know the equipment is fine because if I go into the alsamixer and activate the rear mic input, it comes through my speakers silky smooth like it should.

I have no idea what to do and I'm losing my mind. Can anyone help?
 
Old 06-08-2019, 11:22 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
I tend to add "autospawn = no" to /etc/pulse/client.conf. This lets me stop pulseaudio.

$ pulseaudio --kill

Which lets me do what I want with jack. There's also pulse over jack configurations, and a way to use jack on the alsa Loopback (snd-aloop) device. Many options, most via the command line.
 
Old 06-08-2019, 11:37 AM   #3
The Sego Sago Kid
Member
 
Registered: Feb 2015
Location: PA USA
Distribution: Slackware
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
I tend to add "autospawn = no" to /etc/pulse/client.conf. This lets me stop pulseaudio.

$ pulseaudio --kill

Which lets me do what I want with jack. There's also pulse over jack configurations, and a way to use jack on the alsa Loopback (snd-aloop) device. Many options, most via the command line.
Thanks for the idea. Unfortunately, it has not made any difference.
 
Old 06-08-2019, 11:59 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
I tend to use jackd2 (jackdbus).

Code:
jack_control dps device hw:2
jack_control ds alsa
jack_control eps driver alsa
jack_control eps temporary false
jack_control eps realtime false
jack_control dps inchannels 2
jack_control dps outchannels 2
jack_control dps rate 48000
jack_control dps shorts false
jack_control dps nperiods 2
jack_control dps period 1024
$ jack_control start
$ pulseaudio --kill
$ pulseaudio --start

For my pulse over jack setup. On some chipsets trying an nperiods of 3 makes things better. I think it was a -n or -p type setting for older jack1. I just haven't gone that route for years.
 
Old 06-08-2019, 12:08 PM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
Otherwise stop all the things you're NOT using to avoid resource contentions.

# systemctl stop cups
# systemctl stop cups-browsed
# systemctl stop exim4
# systemctl stop NetworkManager
# systemctl stop sshd
# systemctl stop bluetooth
# pkill wpa_supplicant

Lots of little things to gain more CPU and available I/O (disks / usb bus / ...). You could even modprobe -r the lsmod modules for the things you're not using like wifi, various filesystems (loaded when grub checks for bootable options, but not unloaded when done). I tend to start with minimal installs and things that are not installed do not get started at boot. Offloading a few things to other machines in my case as well. Networked pulseaudio, ethernet to wifi bridge, and such. Not that much of that is your issue.
 
Old 06-08-2019, 12:15 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
Also bear in mind that web browsers now require pulseaudio and will start it when the browser starts. So check your ps output often for things that get in the way.
 
1 members found this post helpful.
Old 06-08-2019, 05:43 PM   #7
The Sego Sago Kid
Member
 
Registered: Feb 2015
Location: PA USA
Distribution: Slackware
Posts: 46

Original Poster
Rep: Reputation: Disabled
Man, sound on Linux is such a catastrophe. I have discovered that ALSA works fine with Ardour (at least for what I'm doing, which is a single input) and have decided to just give up on JACK.

I won't mark this as solved as I've just given up, but yeah. Thanks for trying
 
Old 06-08-2019, 08:30 PM   #8
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: Currently: openSUSE, Raspbian, Slackware. Formerly: CentOS, MacOS, Red Hat. Other: Solaris, Tru64
Posts: 1,670

Rep: Reputation: 202Reputation: 202Reputation: 202
Quote:
Originally Posted by The Sego Sago Kid View Post
Man, sound on Linux is such a catastrophe. I have discovered that ALSA works fine with Ardour (at least for what I'm doing, which is a single input) and have decided to just give up on JACK.
I haven't done anything too weird with Pulseaudio other than having it load extra modules as part of my Jack "post-startup" script:
Code:
/usr/bin/pactl load-module module-jack-sink channels=2
/usr/bin/pactl load-module module-jack-source channels=2
/usr/bin/pacmd set-default-sink jack_out
I do this after starting jack-mixer.

So far, so good. I set up channels in jack-mixer for Audacious, PA, and MPlayer, though, most of the time MPlayer audio tends to go through the PA channel. That's likely a default for MPlayer that I could override in a configuration file if it became too annoying.

It's mostly well behaved. Haven't tried any of the larger audio utilities like Ardor. Audacity on occasion. I'll be hitting that harder in the near future with a conversion project I have on a back burner. That'll likely run into hitches at first.
 
1 members found this post helpful.
Old 06-10-2019, 06:07 AM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
ardour does ALSA now? It used to ONLY do jack. But I stopped recording and stopped using it about the time that it went into some odd fund raising efforts. I liked it over audacity though as ardour recorded to file, audacity recorded to RAM. So if your laptop battery died, you lost your work in audacity, but not in ardour. Or if you wanted to record for a long duration, audacity would bite the bucket when you ran out of RAM (and you'd lose your work). But that was a decade-ish ago.
 
Old 06-10-2019, 06:13 AM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
Quote:
Originally Posted by The Sego Sago Kid View Post
Man, sound on Linux is such a catastrophe.
...
Well it's a shame that for the most part it's still configured on the CLI some 20+ years later. But at least we're not fighting sound daemons as much anymore. arts, esd, oss, aoss, and other we've got your audio card and will not share it things. Pretty much just pulse that will do that so less of a what's your setup these days. And pulse will share, even over a network, with a proper configuration. It just needs to be stopped / started when configurations change. Or when pulse otherwise gets confused. Not so much when using alsa or jack directly, although getting pulse out of the way can be a process.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese input driving me insane Jiawen Linux - General 1 02-07-2004 08:12 PM
Belkin F5D6020 Driving me INSANE Klein Linux - Networking 38 10-11-2003 05:06 PM
"Driving Me Insane" heartagram Linux - Software 2 09-16-2003 08:09 PM
Sendmail is driving me insane. Please help me. ecroskey Linux - Newbie 1 03-02-2003 07:02 AM
printing in linux driving me insane blinux1 Linux - Newbie 2 11-29-2002 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration