So I am still having audio issues after trying a lot of different things I found on here. qjackctl will not start up a server and alsamixer is still only showing one channel so I'm assuming it is not set up correctly. I just updated crouton today so it is the latest and greatest and even did the audio target.
qjackctl output:
'''
12:23:33.295 Patchbay deactivated.
12:23:33.316 Statistics reset.
12:23:33.414 Could not open ALSA sequencer as a client. ALSA MIDI patchbay will be not available.
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
(qjackctl:6485): Gtk-CRITICAL *_: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:6485): Gtk-CRITICAL *_: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
12:23:35.909 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
12:23:38.343 D-BUS: JACK server could not be started. Sorry
Sun May 18 12:23:37 2014: Starting jack server...
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
(qjackctl:6485): Gtk-CRITICAL *_: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:6485): Gtk-CRITICAL *_: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
Sun May 18 12:23:38 2014: JACK server starting in realtime mode with priority 10
Sun May 18 12:23:38 2014: ERROR: Cannot lock down 82278944 byte memory area (Cannot allocate memory)
Sun May 18 12:23:38 2014: ERROR: control open "hw:0" (No such file or directory)
Sun May 18 12:23:38 2014: ERROR: control open "hw:0" (No such file or directory)
Sun May 18 12:23:38 2014: creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Sun May 18 12:23:38 2014: ERROR: control open "hw:0" (No such file or directory)
Sun May 18 12:23:38 2014: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Sun May 18 12:23:38 2014: ERROR: Cannot initialize driver
Sun May 18 12:23:38 2014: ERROR: JackServer::Open failed with -1
Sun May 18 12:23:38 2014: ERROR: Failed to open server
Sun May 18 12:23:39 2014: Saving settings to "/home/morg/.config/jack/conf.xml" ...
12:23:41.640 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
'''
I have tried changing the device output in the settings but it has not given me different results.
This issue has been around for a while, @terrybritton got it sorted in #318 (outdated wiki entry here: https://github.com/dnschneid/crouton/wiki/Full-Blown-Audio-Video-Workstation-using-KDE-chroot-and-KXStudio), then things changed in crouton/Chromium OS, something broke, and for some reasons we never attempted to fix it.
Since there is interest from you, we can try to fix it. There are basically 2 options to get JACK running:
hwaudio group, then get JACK to talk directly to the hardware.I'll try to put together some instructions for both cases, and let you know.
Ok, please try these instructions. They forward JACK audio output to the CRAS server, which I think is preferable in most cases (but please let me know if that's not what you want, I don't know what your use case is, and I know very little about JACK).
Install required packages (I use alsaplayer as a simple JACK audio player):
sudo apt-get install qjackctl
sudo apt-get install alsaplayer-jack
Start qjackctl. It will complain about Could not open ALSA sequencer as a client. ALSA MIDI patchbay will be not available. (related to the MIDI sequencer, see #465 for a workaround if you need MIDI playback)
Then follow these steps in the interface:
Interface to cras (you have to type it in: it does not appear in the list)Then start an application, e.g.:
alsaplayer -o jack -d system:playback_1,system:playback_2 tailtoddle_lo.wav
Let me know if that works, feel free to edit the wiki (or maybe create a new page and link from the KXstudio page).
Works like a charm! Thank you so much!
I had already done the MIDI fix but was stuck on that last part. I'll update the wiki once I get my setup complete I'm looking to get a looper setup for live performance so ill include any modifications I had to make.
I know very little about JACK
@drinkcat, I don't believe you don't know JACK! ( Sorry, couldn't resist ;-)
I have had 100% success with the methods described above.
drinkcat, would you be able to put up instruction on how to do the second method? I tried the first way and alsa player starts and seems to be playing but I'm not getting any sound out of my chromebook (acer c720)...
@Slapp62 and anyone else, I've had success in implementing the aforementioned second method, namely accessing audio hardware directly with JACK. I've posted a guide on the wiki.
What should I do if the sound is very distorted and muffled with no treble frequencies? While I have jackd running, even "native" chrome sounds this way (jack stuff does too), while after jackd is stopped native chrome stuff sounds normal again.
Same problem as jessaustin with using jack->cras, including bad sound on the Chrome side, fixed only by stopping Jack.
@drinkcat: Is there a way to forward jack to cras from a chroot without x11?
The instructions above worked well. However, jack is complaining that it cannot lock down the memory area. I found other sites that talk about that problem, and have verified that the limits file and is correct and I'm in the audio group. Given that this is correct, it seems to be related to crouton. I'm running trusty, with lxde-desktop, on ARM (Nvidia tegra K1). Please advise.
try increasing Frames/Periods to prevent distorted (sometimes even muted) audio. In some cases when hardware cannot be locked down properly, checking 'No memory-lock' and 'Soft-mode' and unchecking 'realtime' will allow jack to start anyways (though with bigger latency).
Ok I've officially bumped myself multiple times on this issue :)
Therefore, I've updated the 'JACK to CRAS'-instruction in the wiki, with the advice: for day-to-day JACK usage just start jackd like this:
usr/bin/jackd -r -s -v -d alsa -P cras & # 'cras' does not show up in qjackctl..you're welcome :)
qjackctl &
Just put it in /etc/X11/xinit/xinitrc etc. Don't start jackd using qjackctl: just do it before qjackctl.
I might be overreacting but the fact that 'cras' is not showing up in qjackctl is so counterintuitive: all your future debugging-sessions are basically doomed.
A manually typed string easily disappears after selecting something else in the dropdown :)
You have been warned :)