Installed OK on fedora 30 but not sound at all

Hi everyone!
I have just installed supercollider on fedora 30 and starting learning following tutorials (not mention of any in particular because I just stop at making my first sound) everything, it seems, has gone OK but I cannot get any sound at all. Would anyone know of any troubleshooting site or give a clue about what I am doing wrong? I’d appreciate it.

In Linux, SuperCollider audio goes through JACK.

JACK configuration is not necessarily transparent. Probably the reason why you aren’t getting any sound is because you haven’t configured JACK. (I’m assuming – could be wrong – but you didn’t mention configuring it, so I’m guessing.)

Maybe this would be of some help:

https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit

hjh

Ok, it’s true, jack configuration it’s a kind of puzzle. I’m re-reading (again and again) instructions and don’t know still what to do to succeed at integrating jack with PulseAudio (I even did not what they have to do with each other (I mean, I thought these decisions were app developers scope) https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit#Integrate_JACK_with_PulseAudio

In the Cadence application (https://kx.studio/Applications:Cadence), there are some buildin bridges for pulseaudio it seems. That might help as a start, but in general you don’t want to use pulseaudio but JACK instead.

I haven’t used Fedora recently, but you may want to take a look at Fedora Jam https://fedoraproject.org/wiki/Fedora_jam#Detailed_Description – it seems to configure the jack - pulseaudio bridge for you. I use Ubuntu Studio which works out of the box, maybe Fedora Jam is similar.

The problem is that JACK wants exclusive access to the soundcard, and PulseAudio has already grabbed the soundcard. Apps don’t have any control over that.

What I do (and I’m afraid I’m not in a position to write out the steps right now) is disable Pulse from launching automatically, then have qjackctl run a script upon Jack startup (to run Pulse as a Jack client app), and another script on shutdown (to stop Pulse).

But cadence is probably easier.

hjh

Now I am in a position to write out how I set it up :laughing:

I won’t say this is the best way to do it. (Probably, using cadence with the D-Bus option to hand the device off is a bit better, or at least more modern.) One drawback of my approach is that my system has no audio at all until I start Jack – but I kind of think this has an advantage of simplicity. The D-Bus way has two states: a/ PulseAudio driving all the audio (and Jack is turned off) and b/ Jack is driving all the audio (and Pulse switched itself to go through Jack). My way also has two states: a/ audio is off, and b/ Jack is driving (Pulse is a client). I find the latter easier to understand and manage, but it doesn’t fit with the user ideal of “I turned it on and I can watch YouTube right away.”

  1. qjackctl --> Setup --> Misc --> disable D-Bus interfaces.
  2. Edit (e.g. sudo nano) /etc/pulse/client.conf to include the following. This says “don’t try to start pulse, and any global server should just be a dummy executable.”
    autospawn = no
    daemon-binary = /bin/true
    
  3. Create ~/.pulse/default.pa:
    load-module module-native-protocol-unix
    load-module module-jack-sink channels=2
    load-module module-jack-source channels=2
    load-module module-null-sink
    load-module module-stream-restore
    load-module module-rescue-streams
    load-module module-always-sink
    load-module module-suspend-on-idle
    set-default-sink jack_out
    set-default-source jack_in
    
  4. Create a script file, somewhere, as pa-jack-start.sh:
    #!/bin/bash
    pulseaudio --start
    pacmd set-default-sink jack_out
    pacmd set-default-source jack_in
    
  5. Create a script file, somewhere, as pa-jack-stop.sh:
    #!/bin/bash
    pulseaudio --kill
    
  6. qjackctl --> Setup --> Options --> reference the scripts from steps 4 and 5 as post-startup and pre-shutdown, respectively.

You might need to logout and login again, or maybe reboot.

After that, when you boot the system, neither PA nor Jack are running and apps will not have any audio (unless they connect directly to ALSA). Start Jack and then both should be active.

My 2c, ymmv etc.

hjh

OK, now that I think I got the (PA) PulseAudio and Jack role and relationship? I’ve tried the (I found it easier) approach (3) to have PulseAudio redirected to use JACK:

  • In QJackCtl, set Execute script on startup to:
    pulseaudio -k

  • and Execute script after startup to:
    pactl load-module module-jack-source | pactl load-module module-jack-sink

but unsuccessful, still… :disappointed_relieved:
I am preparing things to try the (more hackery) recommendation (by jamshark70). Thanks.

Is pulseaudio the problem or the setup of JACK?

Maybe you can run the setup script and post the results

https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit#realTimeConfigQuickScan

Hey, I have to edit the above post. I re-tested once again, this time with headphones connected directly to the PC (I was working all the time with Bluetooth headphones, sorry :pensive: ) and it worked as expected, now I can get sound!! :sweat_smile:
Then I tried any way the entire recommendation posted above by jamshark70 and it also worked!!.
I (still) don’t know what’s the issue behind that makes this behave but it’s not a big problem, at least I am able to carry on with my learning. I do appreciate all the help found here.

Glad it works. Check also the Qjackctl messages for hints. Linux audio user mailinglist and linuxmusicians.com are in general good resources to solve linuxaudio related problems. I would be careful with headphones and SC.

Hey, I do know it’s an old one post but not outdated at all so just for documenting (now I got my Bluetooth headphones working and SuperCollider going trough a physical audio channel which I could get with a plugged speaker). This is what I did:

  1. in QJackCtl ->setup->misc-> enable D-bus interfaces ;again.
  2. Add the following to the list in your ~.pulse/default.pa file, the script suggested by @jamshark70, (check this reference for details)

load-module module-bluetooth-discover
load-module module-bluetooth-policy
load-module module-bluez5-device
load-module module-bluez5-discover

  1. I also did as instructed in the above reference:

chmod -R u+w /var/lib/bluetooth/

  1. Check for the following package and or install it (it’s as the pulseaudio-bluettoth functionality is called in fedora).

$ dnf list pulseaudio-module-bluetooth

  1. in $pavucontrol now the Bluetooth headphones output option is displayed so going to system->hardware->sound we got by default → jack sink (PulseAudio Jack Sink) but also my Bluetooth KS-Harlem headphones, so I do select it and voilá.