QJackctl starting on Qubes 4.0

65 views
Skip to first unread message

maxhea...@gmail.com

unread,
Nov 24, 2018, 2:45:49 PM11/24/18
to qubes-users
Hi all.

I've put enough time into this one where I'm finally willing to reach out for some help. I wanted to see if I could create an AppVm dedicated to music creation, using QJackCtl and other open source software.

However, I'm having a terrible time at even getting Jack Audio off of the floor.

System: Base Qubes 4.0 installation, Fedora 28 template, Thinkpad T480 w/32Gb RAM.

Expected results: Pressing "Start" on the QJackCtl GUI starts the server, per the online manuals and Fedora's Musician documentation.

Actual results: Receive the "Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server." error.

Tried so far: Following online documentation (treating the AppVM as a standard Fedora installation), assigning the Audio PCI of the computer to that VM via the Qubes Manager.

I'm totally willing to have this be something simple and embarrassing as I learn the OS. Any help that you can provide would be much appreciated!

- Max

awokd

unread,
Nov 25, 2018, 7:38:24 AM11/25/18
to maxhea...@gmail.com, qubes-users
maxhea...@gmail.com wrote on 11/24/18 7:45 PM:
If I understand Qubes' audio right, Pulseaudio inside AppVMs gets
redirected to dom0's Pulseaudio which normally controls the sound
hardware. So if you want to override that, maybe try setting up an HVM
with the audio device assigned and without Qubes Pulseaudio redirection.
Think there's a Qubes package that does it so don't install that one in
the HVM.

maxhea...@gmail.com

unread,
Nov 28, 2018, 12:01:59 PM11/28/18
to qubes-users

Thanks, awokd. I tried passing through the audio PCI, but didn't get any farther than the 'Settings' tab in Qjackctl. I could get Jack to recognize the sound card, but couldn't get the server to actually start.

If anyone else has success in implementing Jack Audio (or configuring an audio creation VM in Qubes/Xen), please don't hesitate to contact me!

If this is the intended sound set up for Qubes, it makes sense and I'll instead try the HVM approach to create my audio VM. I'll address the issues that I've found so far in that attempt in another thread.

Excellent community, thank you!

- Max

Ivan Mitev

unread,
Nov 29, 2018, 3:37:29 AM11/29/18
to qubes...@googlegroups.com


On 11/28/18 7:01 PM, maxhea...@gmail.com wrote:
> On Sunday, November 25, 2018 at 7:38:24 AM UTC-5, awokd wrote:
>> maxhea...@gmail.com wrote on 11/24/18 7:45 PM:
>>> Hi all.
>>>
>>> I've put enough time into this one where I'm finally willing to reach out for some help. I wanted to see if I could create an AppVm dedicated to music creation, using QJackCtl and other open source software.
>>>
>>> However, I'm having a terrible time at even getting Jack Audio off of the floor.
>>>
>>> System: Base Qubes 4.0 installation, Fedora 28 template, Thinkpad T480 w/32Gb RAM.
>>>
>>> Expected results: Pressing "Start" on the QJackCtl GUI starts the server, per the online manuals and Fedora's Musician documentation.
>>>
>>> Actual results: Receive the "Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server." error.
>>>
>>> Tried so far: Following online documentation (treating the AppVM as a standard Fedora installation), assigning the Audio PCI of the computer to that VM via the Qubes Manager.
>>>
>>> I'm totally willing to have this be something simple and embarrassing as I learn the OS. Any help that you can provide would be much appreciated!
>>
>> If I understand Qubes' audio right, Pulseaudio inside AppVMs gets
>> redirected to dom0's Pulseaudio which normally controls the sound
>> hardware. So if you want to override that, maybe try setting up an HVM
>> with the audio device assigned and without Qubes Pulseaudio redirection.
>> Think there's a Qubes package that does it so don't install that one in
>> the HVM.
>
> Thanks, awokd. I tried passing through the audio PCI, but didn't get any farther than the 'Settings' tab in Qjackctl. I could get Jack to recognize the sound card, but couldn't get the server to actually start.
>
> If anyone else has success in implementing Jack Audio (or configuring an audio creation VM in Qubes/Xen), please don't hesitate to contact me!

Not meaning to discourage you but latency sensitive stuff will be a
hit-or-miss with virtualization (and by experience misses unfortunately
far outweigh hits). That's because of inaccuracies with the guest OS'
virtualized timer and/or how host resources are prioritized and
allocated to the guests.

With Qubes: my quality USB DAC constantly outputs audible clicks despite
being fed a data stream directly from sys-usb (ie. it's not
"pass-through'ed" to another VM). The same DAC works perfectly well on
other laptops (including a 10+ year old one) without virtualization.
It's USB though, and USB audio sucks so YMMV :)

I do hope you'll manage to have your setup working properly. If not I'd
advise that you buy/use an old laptop dedicated to your audio creation
tasks. That way you could install an audio focused distribution (like
Ubuntu Studio [1], AV Linux [2] - and probably others), as those
distributions package all the popular apps and may provide so-called
realtime kernels that help with latency and jitter.

You could also try to install such a distribution as a HVM in Qubes and
see how it works.

[1] https://ubuntustudio.org/
[2] http://www.bandshed.net/avlinux/

maxhea...@gmail.com

unread,
Nov 30, 2018, 10:41:34 AM11/30/18
to qubes-users

Thank you, Ivan. It's good to hear that there are other Qubes/VM musician types out there in the world.

I would like to test to the situation described above by getting a MIDI device to be recognized by this HVM.

I made a HVM that boots fine, but when I attempt to pass the attached MIDI-device to this HVM, I received an error related to qrexec.

Do devices not pass-through to HVMs as with AppVMs, using the menu in the upper right of XFCE?

- Max

Ivan Mitev

unread,
Nov 30, 2018, 11:33:11 AM11/30/18
to qubes...@googlegroups.com
:)

> I would like to test to the situation described above by getting a MIDI device to be recognized by this HVM.
>
> I made a HVM that boots fine, but when I attempt to pass the attached MIDI-device to this HVM, I received an error related to qrexec.
>
> Do devices not pass-through to HVMs as with AppVMs, using the menu in the upper right of XFCE?

They should, provided the target VM *supports* it.

Did you install your HVM with an iso downloaded from the distribution's
site ? If yes, support for qubes won't be included by default.

In case you installed Ubuntu, have a look at unman's templates and
packages [1]. You should be able to add the proper packages (looks like
'qubes-core-agent-qrexec' - however I have 0 experience with
ubuntu/debian so I can't really help ; I'm sure unman will chime in if
you have any problem though !).

You wrote you were using a laptop so I'm assuming you're trying to
attach a USB device. You will be aiming for the the worst case though :)
- USB controllers on a different VM (resource sharing + timing issues)
- + another amount of latency/jitter/resource consumption because of
passthrough itself
- + no guarantee that passthrough will even work (by experience it's a
hit-or-miss for "non-storage" devices).

For your tests I think it would be much faster and easier for you to
assign the USB controller(s) to your HVM and see how your device works.
That way you won't spend time figuring out how to add qrexsec to your
HVM and you'll avoid the "worst case" problems listed above.
Note: if you have a sys-usb VM you'll have to remember to shut it down
and then start your HVM, as you can't have your USB controllers assigned
to more than one running VM.

Good luck !

Ivan


[1] unman's repositories: http://qubes.3isec.org/

Reply all
Reply to author
Forward
0 new messages