Problems using Scarlet 2i2 whit Jack

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Post Reply
aladinsane60
Posts: 1
Joined: Mon Feb 29, 2016 10:19 pm

Problems using Scarlet 2i2 whit Jack

Post by aladinsane60 »

Hey all,

I'm having problems with my USB interface Scarlett 2i2 and Jack. I've installed Ubuntu Studio 14.04, so I'm not sure what is going wrong. As soon I start Jack, I have the following in the message box:

19:53:55.659 Patchbay desactivada.
19:53:55.659 Reiniciar estadísticas.
19:53:55.712 Cambios en las conexiones ALSA.
19:53:55.722 D-BUS: Disponible (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No existe el archivo o el directorio
Cannot connect to server request channel
jack server is not running or cannot be started
19:53:55.730 Cambió el gráfico de conexiones ALSA.
(qjackctl:2777): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:2777): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

Then, if I run Jack process, I have the following:

20:00:20.727 D-BUS: Iniciando servidor JACK...
Cannot connect to server socket err = No existe el archivo o el directorio
Cannot connect to server request channel
jack server is not running or cannot be started
(qjackctl:2935): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:2935): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
20:00:20.754 D-BUS: El servidor JACK se ha iniciado (org.jackaudio.service aka jackdbus).
Mon Feb 29 20:00:20 2016: Starting jack server...
Mon Feb 29 20:00:20 2016: JACK server starting in realtime mode with priority 10
Mon Feb 29 20:00:20 2016: Acquired audio card Audio1
Mon Feb 29 20:00:20 2016: creating alsa driver ... hw:USB|hw:USB|64|2|44100|0|0|nomon|swmeter|-|32bit
Mon Feb 29 20:00:20 2016: configuring for 44100Hz, period = 64 frames (1.5 ms), buffer = 2 periods
Mon Feb 29 20:00:20 2016: ALSA: final selected sample format for capture: 32bit integer little-endian
Mon Feb 29 20:00:20 2016: ALSA: use 2 periods for capture
Mon Feb 29 20:00:20 2016: ALSA: final selected sample format for playback: 32bit integer little-endian
Mon Feb 29 20:00:20 2016: ALSA: use 2 periods for playback
Mon Feb 29 20:00:20 2016: graph reorder: new port 'system:capture_1'
Mon Feb 29 20:00:20 2016: New client 'system' with PID 0
Mon Feb 29 20:00:20 2016: graph reorder: new port 'system:capture_2'
Mon Feb 29 20:00:20 2016: graph reorder: new port 'system:playback_1'
Mon Feb 29 20:00:20 2016: graph reorder: new port 'system:playback_2'
Mon Feb 29 20:00:20 2016: New client 'PulseAudio JACK Sink' with PID 1973
Mon Feb 29 20:00:20 2016: Connecting 'PulseAudio JACK Sink:front-left' to 'system:playback_1'
Mon Feb 29 20:00:20 2016: Connecting 'PulseAudio JACK Sink:front-right' to 'system:playback_2'
Mon Feb 29 20:00:20 2016: New client 'PulseAudio JACK Source' with PID 1973
Mon Feb 29 20:00:20 2016: Connecting 'system:capture_1' to 'PulseAudio JACK Source:front-left'
Mon Feb 29 20:00:20 2016: Connecting 'system:capture_2' to 'PulseAudio JACK Source:front-right'
Mon Feb 29 20:00:21 2016: Saving settings to "/home/leandro/.config/jack/conf.xml" ...
20:00:22.781 Cambios en las conexiones JACK.
20:00:22.782 Configuración del servidor salvada en "/home/leandro/.jackdrc".
20:00:22.783 Reiniciar estadísticas.
20:00:22.788 Cliente activado.
20:00:22.792 Cambió el gráfico de conexiones de JACK.
Mon Feb 29 20:00:22 2016: New client 'qjackctl' with PID 2935

I've tried a hard internet and forums search, but nothing that really helps, that's why I come to ask for your help. Also, I'm a relatively new Linux user, please, help me. A screenshot of my Jack settings is also attached at this message.
Thank You
Attachments
Settings.png
Settings.png (121.86 KiB) Viewed 895 times
apathity
Established Member
Posts: 82
Joined: Thu Aug 14, 2014 12:15 pm
Location: Austria
Contact:

Re: Problems using Scarlet 2i2 whit Jack

Post by apathity »

Have you tried different values? The following settings work for me:

Frames/Period: 128
Sample Rate: 48000
Periods/Buffer: 2
Realtime box checked
Unlock Memory checked
Force 16bit checked

With these settings I have Latency of 5.33msec

Here's also some more information: http://libremusicproduction.com/article ... arted-jack
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Problems using Scarlet 2i2 whit Jack

Post by Pablo »

From the log, I can't see any problem. Although I agree that 64 frames/period is unnecessarily low and risky,
Jack seems to start correctly. In the connection manager the Scarlett is called "system".
A quick test is playing some music from Audacious with the jack audio output (Archivo,
Preferencias, Audio, Complemento de salida).
JSantos
Established Member
Posts: 8
Joined: Tue Mar 01, 2016 11:38 am

Re: Problems using Scarlet 2i2 whit Jack

Post by JSantos »

As what Pablo said, 64 frames isn't really the best way to go with it.

Have you tried to use settings further from your ideal? Or even the furthest? If it does away with your error, it might just be that you need some looser settings. That really looks tight.
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: Problems using Scarlet 2i2 whit Jack

Post by gimmeapill »

That could be a permissions issue - try to uncheck Real Time (this implies raising the latency to something more mundane like 512 frames).
If this ever works, time to (re)read: http://wiki.linuxaudio.org/wiki/system_ ... faudioconf

Next bet would something blocking the card (pulse audio is the usual suspect, web browser with Flash could be another). Try to kill anything potentially using it.

I would also disable dbus in qjackctl options, and also select explicitly the input/output interfaces in qjackctl (who knows what Default is), and try other frequencies (96K would be my first choice, as I found the scarlett to perform even better than at 44100).

And for best results use 3 periods (this seems to provide the best compromise for most USB cards).

More generally, to get into the <5ms latency game:
- Use the most recent RT kernel - if possible a light system (Hint: this is not Ubuntu 14.04, although I'm not saying this cannot work)
- Check your system with http://wiki.linuxaudio.org/wiki/system_ ... #quickscan (to save everyone's sanity when troubleshooting, please post the results).

BTW, the Scarlet 2i2 is perfectly capable to go down to 96K * 32frames * 3periods - just you won't run any heavy application at this low latency...
Post Reply