Sonic Pi in LliureX (distribution based on KDE neon)

Hi!
Since I discovered Sonic Pi, I’m totally convinced that would be useful for my Music classes at school. In our educative system we have our own Linux distribution, LliureX 19 (based on KDE Neon). It would be awesome to teach Sonic Pi!
I’m trying to install Sonic Pi but I’m getting a lot of troubles.
This is what I did:

sudo apt-get update

Then:

sudo apt install sonic-pi sonic-pi-server-doc supercollider pulseaudio-module-jack

After that, I force to close pulse audio:

pulseaudio --kill &

And run qjackctl. When I press Start on Jack, it gives me an error. Where’s the problem?

Two things. The first is that your running a “customized” linux distro. Not that it’s bad, it just that it would be impossible for anyone here to know to what extent it was customized from the original. Your devs might have made changes that prevent Sonic Pi from running due to configuration changes, libraries not installed, etc. So, in that regard, you might want to contact your devs or system administrator who have access

Secondly, it would be immensely helpful if you posted the error message … :wink:

Cheers.

Hi @paubarrina,

in addition: The version you can install via apt is quite old (I think it is 2.1 or something like that), Meanwhile we have a stable version 3.1. For Linux you will have to compile Sonic Pi on your own, which might pose a considerable obstacle. There are quite a few posts dealing with that though and you will probably be able to get help here. As @TheTraveler points out: error messages and logs can be crucial for that.

One thing you should do is, to post any error messages from here: ~/.sonic-pi/log/ and the various log files you will find there. Hope that is helpful.

1 Like

Thank you.

After killing pulseaudio, I run Jack. This is the message I get: D-BUS: JACK server could not be started. Sorry

In the messages window, I can see this:

16:04:41.677 Statistics reset.

16:04:41.686 ALSA connection change.

16:04:41.691 D-BUS: Service is available (org.jackaudio.service aka jackdbus).

Cannot connect to server socket err = El fitxer o directori no existeix

Cannot connect to server request channel

jack server is not running or cannot be started

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

16:04:41.807 ALSA connection graph change.

16:04:43.775 D-BUS: JACK server could not be started. Sorry

Cannot connect to server socket err = El fitxer o directori no existeix

Cannot connect to server request channel

jack server is not running or cannot be started

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Fri Sep 13 16:04:43 2019: Starting jack server…

Fri Sep 13 16:04:43 2019: JACK server starting in realtime mode with priority 10

Fri Sep 13 16:04:43 2019: self-connect-mode is “Don’t restrict self connect requests”

Fri Sep 13 16:04:43 2019: ERROR: Cannot lock down 82280346 byte memory area (Cannot allocate memory)

Fri Sep 13 16:04:43 2019: Acquired audio card Audio0

Fri Sep 13 16:04:43 2019: creating alsa driver … hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit

Fri Sep 13 16:04:43 2019: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode

Fri Sep 13 16:04:43 2019: Released audio card Audio0

Fri Sep 13 16:04:43 2019: ERROR: Cannot initialize driver

Fri Sep 13 16:04:43 2019: ERROR: JackServer::Open failed with -1

Fri Sep 13 16:04:43 2019: ERROR: Failed to open server

Fri Sep 13 16:04:45 2019: Saving settings to “/home/administrador/.config/jack/conf.xml” …

16:06:32.660 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 = El fitxer o directori no existeix

Cannot connect to server request channel

jack server is not running or cannot be started

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

It seems like pulseaudio --kill & wouldn’t work.

Hi @paubarrina,

I am not sure you have to kill pulseaudio. Actually I also have it in my starting script but the following does work flawlessly on my machine:

jackd -d alsa --device hw:0 --rate 44100 --period 1024

Of course you will have to adjust at least the device if it does not fit by accident. If this works, you can start qjackctl to be sure that Jack is running but you won’t need it. You could then try and start Sonic Pi.

If the command above does not work, feel free to post the output. I am no expert at all but am working with Linux and Jack quite a while, so I might spot what you could try next…

1 Like

I’ve been a long time user of Linux and I can tell you jackd has a long history of weirdness. As KDE Neon uses Ubuntu as the base you might want to search their forums for a solution as well. A quick search myself revealed several possible solutions to your problem, some of them, well, strange but they worked for others. Depending on how your version of the OS was installed, configured and/or secured you may have to try several solutions before you solve the problem. To start, here’s a thread that appears similar to the problem you’ve described:

https://ubuntuforums.org/showthread.php?t=2355731

Cheers.

1 Like

This is what I get with that command:

administrador@lliurex-HP-250-G4-Notebook-PC:~$ jackd -d alsa --device hw:0 --rate 44100 --period 1024
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp 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
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is “Don’t restrict self connect requests”
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
audio_reservation_init
Acquire audio card Audio0
creating alsa driver … hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server

Hi @paubarrina,

I havn’t encountered this problem yet:

ALSA: Cannot open PCM device alsa_pcm for playback

Probably a good time for googling as @TheTraveler advised. You might want to check this entry, where I googled for “jack Cannot open PCM device alsa_pcm for playback”. Sorry that I can not be more specific at the moment :frowning:

PS.: Naming the soundcards whan calling jackd can be quite tricky. So probably a good idea to experiment with that and also use aplay -l to find out the available soundcards.

Solved! It was a stupid mistake.


The computer take HDMI as the 1st hardware input. Thank you @Martin and @TheTraveler.

Wow, glad to hear that! Now you are up and running… :wink:

Heh. Occam’s Razor at work. “Make no more assumptions than necessary”. Although I have to admit, I wouldn’t have thought of this one. Glad to hear it is running for you Paul. :slight_smile:

Cheers.