# Problem running Qtractor (last version) on FreeBSD 13.1 and I get the following error message.



## Manuel L (Dec 16, 2022)

Hi Hello Dear Forums of FreeBSD

Finally I installed freebsd 13.1 and I have most of my setup done but I have a few issues with some DAWs (ardour and qtractor), so let's begin with the issue with qtractor then later I will say what is happening with ardour.

I installed the binary of Qtractor from the pkg package and the program is not running just saying this following message "The audio/Midi engine could not be started, make sure JACK audio server and alsa-seq-server are up and running and then restart the session". I just tried to run alsa-seq-server and jackd manually but even with that is not working (also i could run one time but there was not sound). What is happening or what is going on ?, i just want which step I just missing to run qtractor on FreeBSD.


----------



## cracauer@ (Dec 16, 2022)

Does sound with basic jack usage?


----------



## Manuel L (Dec 16, 2022)

I have tried to use Ardour 6.9 but seems to be working (only as a root, that's another issue i have) this happens when i run qjack and jack as a root it runs but yes, not sound.


----------



## cracauer@ (Dec 16, 2022)

Allright. Can you post the output of these commands?

```
dmesg | egrep '^(pcm|hda)'
mixer
```


----------



## Manuel L (Dec 16, 2022)

Hi here is the informartion :

hdac0: <Intel Sunrise Point-LP HDA Controller> mem 0x94220000-0x94223fff,0x94210000-0x9421ffff irq 16 at device 31.3 on pci0
hdacc0: <Conexant CX20751/2 HDA CODEC> at cad 0 on hdac0
hdaa0: <Conexant CX20751/2 Audio Function Group> at nid 1 on hdacc0
pcm0: <Conexant CX20751/2 (Analog)> at nid 23 and 26 on hdaa0
pcm1: <Conexant CX20751/2 (Right Analog)> at nid 22 and 25 on hdaa0
hdacc1: <Intel Skylake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Skylake Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer rec      is currently set to   1:1
Mixer monitor  is currently set to  56:56
Recording source: monitor

What can be wrong or what is happening ?


----------



## cracauer@ (Dec 16, 2022)

Well, you have multiple sound devices. If you use the wrong one no sound is coming off your speakers.

How exactly do you start jackd?


----------



## Manuel L (Dec 16, 2022)

Well at the moment I am running qjack to run jackd and I think this computer on Cinnamon Desktop uses Conexant CX20751/2 and how I setup Jackd to use this one (i mean conexant) ? also may  be I am running jackd in the wrong way.


----------



## cracauer@ (Dec 16, 2022)

Well, you need to try the 3 different devices to find out which one is actually connected to your speakers.

Otherwise there isn't much to call jackd the wrong way.


----------



## Manuel L (Dec 17, 2022)

Checking on cinnamon desktop this is the device used in freebsd : pcm0: <Conexant CX20751/2 (Analog)> at nid 23 and 26 on hdaa0 may be i will check qjack how to setup this device. In which way can i setup the permissions of those programs (ardour and qtractor) to use my user and not as a root ?


----------



## Manuel L (Dec 17, 2022)

Hi again, it seems ardour is working fine now, I will try with qtractor later. Just one question how can I give permissions on FreeBSD to use my own account on qjack,qtractor and ardour and not to be as a root ? is there anyway to do this ?


----------



## Manuel L (Dec 17, 2022)

Hi and thanks so much is working now (as a root), I could run both programs qtractor and ardour (i am really wanted to run them) and how I can setup the permissions to run both programs to run with my user instead of being to be as a root ? is there anyway to do that ?


----------



## cracauer@ (Dec 17, 2022)

So far so good 

What is the error message when you run ardour as non-root?


----------



## Manuel L (Dec 18, 2022)

Here are the errors :

Ardour 6.9 = 
---ERROR: JACK: Cannot create thread res = 1
ERROR: JACK: JackClient::AcquireSelfRealTime error
ERROR: JACK: Cannot use real-time scheduling (RR/5) (1: Operation not permitted)

(from console) = 
see also http://manual.ardour.org/video-timeline/setup/
INFO: Loading menus from /usr/local/etc/ardour6/ardour.menus
ERROR: JACK: Cannot create thread res = 1

Qtractor = 

Cannot use real-time scheduling (RR/5) (1: Operation not permitted)

JackClient::AcquireSelfRealTime error

But also it seems that the main problem is that I need to run alsa-seq-server as a root because if i tried to run with my user account it says that "Could not connect to cuse module" (I already added the module on my machine. Is possible to run alsa-seq-server as a service or to load when booting the machine ?.

These are last problems that I have running qtractor and ardour on FreeBSD 13.1


----------



## Manuel L (Dec 18, 2022)

Also do yo know a way to start alsa-seq-server in the boot on FreeBSD 13.1 ?


----------



## cracauer@ (Dec 18, 2022)

Manuel L said:


> Here are the errors :
> 
> Ardour 6.9 =
> ---ERROR: JACK: Cannot create thread res = 1
> ...


Allright, let's take care of the realtime "errors" first. I put it in quotes because it should be a warning, not an error.
You can follow these steps to enable group-based rt prio:








						GitHub - 0EVSG/freebsd_jack_notes: Notes and user guides for jack audio server on FreeBSD
					

Notes and user guides for jack audio server on FreeBSD - GitHub - 0EVSG/freebsd_jack_notes: Notes and user guides for jack audio server on FreeBSD




					github.com
				




Note that you need to log out and back in after adding yourself to the group.

Alternatively you can just enable rtprio for all users:

```
sysctl security.bsd.unprivileged_idprio=1
```


----------



## cracauer@ (Dec 18, 2022)

Manuel L said:


> Also do yo know a way to start alsa-seq-server in the boot on FreeBSD 13.1 ?


You can just start it in /etc/rc.local. That is a shellscript. If it doesn't exist yet, remember to set file permissions to executable after creating it.


----------



## Manuel L (Dec 18, 2022)

Hi and thanks again, there is a rc.local file but I will need to add alsa-seq-server  to rc.local or i will need to create a shell script to run alsa-seq-server  inside of rc.local ?


----------



## cracauer@ (Dec 18, 2022)

Manuel L said:


> Hi and thanks again, there is a rc.local file but I will need to add alsa-seq-server  to rc.local or i will need to create a shell script to run alsa-seq-server  inside of rc.local ?



You can just directly put one commandline into /etc/rc.local

No need for an indirection through another script.


----------



## Manuel L (Dec 19, 2022)

Hi thanks so much everything is working now, I just follow the steps of the link everything seems working now. Later I may write some documentation or a "how to" setup an audio studio or a daw on freebsd. Your help and the FreeBSD forums are amazing! (may be later I will join the foundation or join freebsd comunity) I would like to learn more about the os and give also support.


----------



## cracauer@ (Dec 19, 2022)

Do you have an idea why the thread create error went away? Maybe it failed because of rtprio?


----------



## Manuel L (Dec 19, 2022)

I think that the main issue was is that I didn't have created the group, the setting of the realtime on freebsd,  I have to setup Jack with my username on the rc.config and also that I didn't know how to run alsa-seq-server on the rc.local. Right now it is working as I wanted or like using my Debian Linux machine and again thanks so much, this has been resolved (Do I need to close the case ? or will you closed as resolved ?).


----------

