Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Multimedia & Video
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Multimedia & Video
Have multimedia question? ATI, Nvidia, Sound cards. Just ask here.

 
Thread Tools Display Modes
Old January 17th, 2008   #11
rgeddes
Just Give Me the Beans!
 
rgeddes's Avatar
 
Join Date: Aug 2006
Location: US - Pennsylvania
Beans: 77
Ubuntu 9.04 Jaunty Jackalope
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

After going over the instructions, I read that I may not need jack_transport... the pulseaudio I'm using is 0.9.6-1ubuntu2... anyway I proceeded as if I didn't need jack_transport.... commented out the script lines that refer to jack_transport.

there is a section that references the jack-rack config file... I assume it can be any name.. does it contain something in particular (I've never used jack-rack)

When I got to the step to change the settings under System-> Preferences->Sound under the device tab, the drop downs didn't list Pulse Audio Server... I thought maybe I have to run the final script, so I ran it...

got a message dialog from jack-rack ... Could not create JACK client Is the server running?

Also got he following terminal output:

jackd 0.103.0
Copyright 2001-2005 Paul Davis and others.
jackd 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

JACK compiled with System V SHM support.
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
E: module.c: Failed to open module "module-jack-sink": libpulsecore.so.2: cannot open shared object file: No such file or directory
E: main.c: Module load failed.
E: main.c: failed to initialize daemon.
JACK tmpdir identified as [/dev/shm]
process_info_connect_jack: could not create jack client; exiting
JACK tmpdir identified as [/dev/shm]
jack server not running?
JACK tmpdir identified as [/dev/shm]
jack server not running?
JACK tmpdir identified as [/dev/shm]
jack server not running?
JACK tmpdir identified as [/dev/shm]
jack server not running?


BTW, jackd is running...

$0> ps aux | grep jackd | grep -v grep
root 7270 0.3 2.9 22556 22748 ? SLsl 13:09 0:01 jackd -R -d alsa

Out of curiosity, I started jacd through the qtjackctl manually, and Jack Rack gives the same message.... Could not create JACK client Is the server running?

Any help is appreciated
rgeddes is offline   Reply With Quote
Old January 18th, 2008   #12
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Quote:
Originally Posted by rgeddes View Post
I tried to extract the rpm file from my file manager(right click -> extract here) and it didn't recognize the format. I dug around the internet and found a script rpm2cpio.sh... at http://www.rpm.org/tools/scripts/
that didn't work... complained about a piped stdin not in gzip format.

Is there an easy tool that is in one of the std repositories for extracting rpms?

Thanks
That shouldn't be any problem - I just did the same maneuver over here (Gutsy). The message seems to hint that the rpm is faulty - maybe not completely downloaded? Try downloading it again.
motin is offline   Reply With Quote
Old January 18th, 2008   #13
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Quote:
Originally Posted by rgeddes View Post
E: module.c: Failed to open module "module-jack-sink": libpulsecore.so.2: cannot open shared object file: No such file or directory
E: main.c: Module load failed.
E: main.c: failed to initialize daemon.
I got the same error in Gutsy. Tried this:

Code:
sudo ln -s /usr/lib/libpulsecore.so.3.0.0 /usr/lib/libpulsecore.so.2
And now the file is found but I get this instead:

With jackd running (through qjackctl running as normal user):

Code:
motin@laptop:~$ pulseaudio -n -F /home/motin/.jackd.pa &
[2] 10790
motin@laptop:~$ JACK tmpdir identified as [/dev/shm]
W: module-jack-sink.c: JACK error >cannot lock down memory for RT thread (Operation not permitted)<
JACK tmpdir identified as [/dev/shm]
W: module-jack-source.c: JACK error >cannot lock down memory for RT thread (Operation not permitted)<
E: module-jack-source.c: jack_client_open() failed.
E: module.c: Failed to load  module "module-jack-source" (argument: ""): initialization failed.
E: main.c: Module load failed.
E: main.c: failed to initialize daemon.
Without:

Code:
$ pulseaudio -n -F /home/motin/.jackd.pa &
[1] 10707
JACK tmpdir identified as [/dev/shm]
exec of JACK server (command = "jackd") failed: No such file or directory
E: module-jack-sink.c: jack_client_open() failed.
E: module.c: Failed to load  module "module-jack-sink" (argument: ""): initialization failed.
E: main.c: Module load failed.
E: main.c: failed to initialize daemon.
With jackd and sudo'd:

Code:
$ sudo pulseaudio -n -F /home/motin/.jackd.pa &
[3] 10820
motin@laptop:~$ W: main.c: This program is not intended to be run as root (unless --system is specified).
JACK tmpdir identified as [/dev/shm]
exec of JACK server (command = "jackd") failed: No such file or directory
E: module-jack-sink.c: jack_client_open() failed.
E: module.c: Failed to load  module "module-jack-sink" (argument: ""): initialization failed.
E: main.c: Module load failed.
E: main.c: failed to initialize daemon.
So, I am trying the Debian lenny-version of PulseAudio by using prevu:

Code:
sudo apt-get install prevu
sudo prevu-init # <-- only needed to be run before the first time prevu is used
prevu http://ftp.de.debian.org/debian/pool/main/p/pulseaudio/pulseaudio_0.9.8-2.dsc
sudo apt-get install pulseaudio-module-jack -V
sudo adduser `whoami` pulse-rt
# log out and back in
Gotta log out and back in ... ibb.
motin is offline   Reply With Quote
Old January 18th, 2008   #14
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Ok - with the 0.9.8 version that problem seem to be fixed so almost there...

Sound works in:
xine
amarok

But not in:
firefox
flash

Also, vlc doesn't start any longer (may or may not be related).

More about these problems later. First:

Here is the difference between the Pulsa Audio config file /etc/pulse/default.pa and my own breed ~/.jackd.pa :

Code:
$ diff .jackd.pa  /etc/pulse/default.pa 
19,22d18
< # Jack sinks
< load-module module-jack-sink
< load-module module-jack-source
< 
27c23
< #jack# load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
---
> load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
45c41
< #jack# load-module module-hal-detect
---
> load-module module-hal-detect
49c45
< #jack# load-module module-detect
---
> load-module module-detect
54c50
< #jack# load-module module-esound-protocol-unix socket="/tmp/.esd/socket"
---
> load-module module-esound-protocol-unix socket="/tmp/.esd/socket"
56c52
< #jack# load-module module-native-protocol-unix
---
> load-module module-native-protocol-unix
91c87
< # disabled because of error message "PulseAudio information vanished from X11" # load-module module-x11-publish
---
> load-module module-x11-publish
The shell-script:

Code:
#!/bin/sh

#jackd -R -d alsa &
# I'm loading the control center instead - I have set it to automatically start the JACK server upon startup (+ enabled the taskbar icon btw)
qjackctl &

sleep 5

# 
pulseaudio -n -F $HOME/.jackd.pa &

# specify your default plugin setup for JACK Rack here
RACKFILE=$HOME/.default.rack

# start JACK Rack
jack-rack -n $RACKFILE &

# wait for JACK Rack to register with JACK
sleep 3 

# connect
jack_connect "PulseAudio JACK Sink:front-left" jack_rack:in_1
jack_connect "PulseAudio JACK Sink:front-right" jack_rack:in_2
for ch in 1 2; do
    # rack -> speakers
    jack_connect jack_rack:out_$ch alsa_pcm:playback_$ch
done
The VLC error message:

Code:
$ vlc
VLC media player 0.8.6c Janus
The program '.' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 474 error_code 11 request_code 145 minor_code 5)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Now, flash in firefox doesn't work. Firefox doesn't even show up as a JACK output port (should it?).

I changed to the padsp and installed the debian package of libflashsupport from http://pulseaudio.vdbonline.net/libflashsupport/

Any ides of how to proceed in order to get Flash in Firefox sound working?

Thanks a million for the guide and help so far!
motin is offline   Reply With Quote
Old January 18th, 2008   #15
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Also, even though it is possible to process all applications' sound through JACK Rack - I have to disconnect the relevant output port from alsa_pcm and connect it to jack_rack in order to run it though JACK Rack. Can this be done automatically?
motin is offline   Reply With Quote
Old January 21st, 2008   #16
hotspoons
5 Cups of Ubuntu
 
Join Date: Apr 2005
Beans: 26
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Wow...I never check my hotmail account, and I logged in today and noticed a bunch of replies to this. Crazy! For my particular application (car audio) I found it more reliable to use the jack sink for gstreamer and change my gstreamer properties to route all gstreamer output to jack. Here's a walk through I wrote up for that: http://ubuntuforums.org/showthread.p...highlight=jack . This (pulse) solution, in combination with the gstreamer solution, would take care of almost all of your audio. I'll read through this later and see if I can remember any tips for you guys who were stuck.

-Rich
__________________
-rich
hotspoons is offline   Reply With Quote
Old April 25th, 2008   #17
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Unfortunately, Kubuntu's Amarok doesn't support gstreamer atm, and sure, I could go with the Amarok jack output plugin and probably live adequately, but now with Hardy installed it would be a shame not to be able to plug in jack between Pulse and the soundcard...

So, after having installed pulseaudio-module-jack from debian lenny, I can now start jack using qjackctl or:
Code:
/usr/bin/jackd -R -t2000 -dalsa -dhw:0 -r44100 -p128 -n2
... followed by PulseAudio in jack-mode:
Code:
pulseaudio -vnF /home/motin/.jackd.pa
Using the following .jackd.pa:
Code:
#!/usr/bin/pulseaudio -nF

# Jack sinks
load-module module-jack-sink
load-module module-jack-source

### Automatically restore the volume of playback streams
load-module module-volume-restore

### Automatically restore the default sink/source when changed by the user during runtime
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists /usr/lib/pulse-0.9/modules//module-gconf.so
load-module module-gconf
.endif

.fail
Now PulseAudio starts fine with the following log messages:
Code:
motin@laptop:~$ pulseaudio -vnF /home/motin/.jackd.pa
I: main.c: We're in the group 'pulse-rt', allowing real-time and high-priority scheduling.
I: core-util.c: Successfully gained nice level -11.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operationen inte tillåten
I: main.c: This is PulseAudio 0.9.10
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: module-jack-sink.c: Successfully connected as 'PulseAudio JACK Sink'
I: sink.c: Created sink 0 "jack_out" with sample spec "float32le 2ch 44100Hz"
I: source.c: Created source 0 "jack_out.monitor" with sample spec "float32le 2ch 44100Hz"
I: module-jack-sink.c: JACK thread starting up.
I: module-jack-sink.c: Connecting PulseAudio JACK Sink:front-left to system:playback_1
I: module-jack-sink.c: Connecting PulseAudio JACK Sink:front-right to system:playback_2
I: module.c: Loaded "module-jack-sink" (index: #0; argument: "").
I: module-jack-source.c: Successfully connected as 'PulseAudio JACK Source'
I: source.c: Created source 1 "jack_in" with sample spec "float32le 2ch 44100Hz"
I: module-jack-source.c: JACK thread starting up.
I: module-jack-source.c: connecting PulseAudio JACK Source:front-left to system:capture_1
I: module-jack-source.c: connecting PulseAudio JACK Source:front-right to system:capture_2
I: module.c: Loaded "module-jack-source" (index: #1; argument: "").
I: module.c: Loaded "module-volume-restore" (index: #2; argument: "").
I: module.c: Loaded "module-default-device-restore" (index: #3; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #4; argument: "").
I: module.c: Loaded "module-gconf" (index: #5; argument: "").
I: main.c: Daemon startup complete.
...and seems to connect itself to JACK (looks fine in qjackctl's Connect-overview), but everytime I try to play a sample, no sound is heard and jackd starts spitting out hundreds of messages about xruns...:
Code:
**** alsa_pcm: xrun of at least 1.387 msecs



**** alsa_pcm: xrun of at least 2.377 msecs



**** alsa_pcm: xrun of at least 1.099 msecs



...
I can but guess that this has something to do with the realtime mode of either PulseAudio or JACK but know no more. Can anybody figure out what's the issue here?

Soooo close now to finally be able to run all application sounds through JACK...
motin is offline   Reply With Quote
Old May 4th, 2008   #18
noisesmith
First Cup of Ubuntu
 
Join Date: Mar 2008
Beans: 5
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Quote:
Originally Posted by motin View Post
Unfortunately, Kubuntu's Amarok doesn't support gstreamer atm, and sure, I could go with the Amarok jack output plugin and probably live adequately, but now with Hardy installed it would be a shame not to be able to plug in jack between Pulse and the soundcard...

So, after having installed pulseaudio-module-jack from debian lenny, I can now start jack using qjackctl or:
Code:
/usr/bin/jackd -R -t2000 -dalsa -dhw:0 -r44100 -p128 -n2
... followed by PulseAudio in jack-mode:
Code:
pulseaudio -vnF /home/motin/.jackd.pa
Using the following .jackd.pa:
Code:
#!/usr/bin/pulseaudio -nF

# Jack sinks
load-module module-jack-sink
load-module module-jack-source

### Automatically restore the volume of playback streams
load-module module-volume-restore

### Automatically restore the default sink/source when changed by the user during runtime
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists /usr/lib/pulse-0.9/modules//module-gconf.so
load-module module-gconf
.endif

.fail
Now PulseAudio starts fine with the following log messages:
Code:
motin@laptop:~$ pulseaudio -vnF /home/motin/.jackd.pa
I: main.c: We're in the group 'pulse-rt', allowing real-time and high-priority scheduling.
I: core-util.c: Successfully gained nice level -11.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operationen inte tillåten
I: main.c: This is PulseAudio 0.9.10
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: module-jack-sink.c: Successfully connected as 'PulseAudio JACK Sink'
I: sink.c: Created sink 0 "jack_out" with sample spec "float32le 2ch 44100Hz"
I: source.c: Created source 0 "jack_out.monitor" with sample spec "float32le 2ch 44100Hz"
I: module-jack-sink.c: JACK thread starting up.
I: module-jack-sink.c: Connecting PulseAudio JACK Sink:front-left to system:playback_1
I: module-jack-sink.c: Connecting PulseAudio JACK Sink:front-right to system:playback_2
I: module.c: Loaded "module-jack-sink" (index: #0; argument: "").
I: module-jack-source.c: Successfully connected as 'PulseAudio JACK Source'
I: source.c: Created source 1 "jack_in" with sample spec "float32le 2ch 44100Hz"
I: module-jack-source.c: JACK thread starting up.
I: module-jack-source.c: connecting PulseAudio JACK Source:front-left to system:capture_1
I: module-jack-source.c: connecting PulseAudio JACK Source:front-right to system:capture_2
I: module.c: Loaded "module-jack-source" (index: #1; argument: "").
I: module.c: Loaded "module-volume-restore" (index: #2; argument: "").
I: module.c: Loaded "module-default-device-restore" (index: #3; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #4; argument: "").
I: module.c: Loaded "module-gconf" (index: #5; argument: "").
I: main.c: Daemon startup complete.
...and seems to connect itself to JACK (looks fine in qjackctl's Connect-overview), but everytime I try to play a sample, no sound is heard and jackd starts spitting out hundreds of messages about xruns...:
Code:
**** alsa_pcm: xrun of at least 1.387 msecs



**** alsa_pcm: xrun of at least 2.377 msecs



**** alsa_pcm: xrun of at least 1.099 msecs



...
I can but guess that this has something to do with the realtime mode of either PulseAudio or JACK but know no more. Can anybody figure out what's the issue here?

Soooo close now to finally be able to run all application sounds through JACK...
The xruns are caused by too small a frames/period setting or periods/buffer setting in qjackctl. Try different values, and pick the smallest value of (frames/period)*(periods/buffer) that does not make xruns happen regularly.
noisesmith is offline   Reply With Quote
Old June 25th, 2008   #19
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Having bought a new computer, I just tried to reaccomplish this. This time I do not get any errors at start-up of neither jack nor pulseaudio but on the other hand other clients cannot connect to the pulseaudio server...

Has anyone tried this since last time we posted and have any success stories to share?
motin is offline   Reply With Quote
Old July 3rd, 2008   #20
motin
Skinny Soy Caramel Ubuntu
 
Join Date: Mar 2006
Location: Stockholm, Sweden
Beans: 683
Ubuntu Studio Karmic Koala (testing)
Re: Howto: Route all sound to Jack via Pulse Audio in Feisty (finally EQ in all audio

Quote:
Originally Posted by neltnerb View Post
I agree that pulseaudio outputting to jack is ideal, but this seems to be much further from functional than your HOWTO here as far as amarok is concerned =) I feel like a reasonable workaround should be to have ALSA recognize jack as an output device, but even though I was able to do this, it didn't integrate at all into the rest of the system.

In particular, jackd has to be running before you try to connect ALSA to it -- since ALSA starts far before you can open qjackctl or run jackd from the command line as a human, this has to be addressed by some sort of script. I'm not sure as to the timing, so that's something that would have to be addressed. Further, the System->Sound configuration tool didn't list the jack devices even when I started the jack server and then restarted ALSA. I could *try* to figure out how to configure gnome to output to my chosen device, but it's a lot of hassle.

I'd personally rather just use this workaround for my music along with 'mplayer -ao jack' for movies until the Ubuntu developers consider jack to be stable enough to include in universe. The only other thing I'd like to be able to do is get firefox to output to jack as well, but I don't see anything reasonable matching 'sound' or 'audio' in about:config.
Never thought about the Jack before Alsa requirement... Maybe that's the whole deal here. Have you tried following the steps in this guide? It worked on Feisty for the OP, but I haven't had any luck... Would be interesting to see if one of us could make it work...
motin is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:14 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry