no sound from sound card

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

no sound from sound card

Post by Telover »

Hi all,
I'm writing to ask advices and/or solutions, if do exist.
I have an external sound card, a M-Audio, connected to a laptop through USB port. The internal soundcard I think it's a integrated Intel.
Anyways. Connected to the M-Audio I have a pair of Yamaha monitors.
I use Ardour for recording and Audacity is I have to assemble different pieces of music.
Now the problem is I hear the sound from the monitors while I'm in Ardour. But if I quit Ardour and starrt Audacity, or also if I want to listen to a wav or flac file I have on the computer through the monitors, I have no sound.
Though in the Audio Settings of the computer the M-Audio is selected, I hear no sound at all.
A guy made me notice than Ardour uses Jack as a audio server. But, is it possible that for listening to the sound through the monitors, also not being in Ardour, I have to use Jack?
Isn't there a way to make the external sound card becoming the default device once it's on, excluding the integrated one?
Thank you for any help.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

There are several options. Which distro are you using?
But if I quit Ardour and starrt Audacity, or also if I want to listen to a wav or flac file I have on the computer through the monitors, I have no sound.
Though in the Audio Settings of the computer the M-Audio is selected, I hear no sound at all
Probably because the jack audio server is still active. For a quick workaround do (in a terminal window):

killall -9 jackd jackdbus

and try again. It is recommended you have control over jack start and stop by using a program such as qjackctl or Cadence, instead of letting ardour start jack.

I (my distro, really, which is ubuntu 16.04) use qjackctl, jackdbus and the pulseaudio jack sink to redirect "system sounds" to jack when jack is active and pulseaudio takes over when jack is not active. It works rather seamlessly.

Finally, if you won't use the onboard audio card at all, consider disabling it in the BIOS.
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

Hi Pablo and thanks alot for the infos.
I have the same distro, the 16.04 LTS 64bit.
Actually I never use Qjack, I just open Ardour and Jack opens up consequently.
I usually use the onboard audio, I would like to use the external sound card only when I chose it, beside when using Ardour.
I wonder is there might be an automatic process that enables the m-audio every time I turn it on.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

Actually I never use Qjack, I just open Ardour and Jack opens up consequently.
ardour starts "jackd" and qjackctl starts "jackdbus".

There is a difference. Pulseaudio (the default audio system) will recognize that jack is active if jack is jackdbus but not if it is jackd.

And ardour doesn't care if jack is jackd or jackdbus, it will see that jack is active and its own audio/midi configuration dialog won't show up.

So try launching qjackctl. Make sure you select the right audio card (setup, interface) and press start (now jackdbus is active) Now, start ardour: The audio configuration is not shown, that's ok. Now, check the general audio settings (this is, the pulseaudio interface): you have a Jack Sink. Select that. Now system sounds will be directed to the audio card that jack is using.

To close, close ardour, press stop in qjackctl, close qjackctl. Pulseaudio will take control, and you might to select the audio card you want (onboard or m-audio) in the desktop audio configuration.

Cheers, Pablo
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

Pablo, I said that about Ardour because since the version 4, you don't need anymore to start Qjackctl. Ardour does it automatically, that''s why I said I never start Qjack.But surely the process remains started when I quit Ardour.
For general audio settings do you mean the audios setup? I mean what's located below the speaker icon in the top bar?
Sorry but I'm not really expert.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

For general audio settings do you mean the audios setup? I mean what's located below the speaker icon in the top bar?
Yes. And that also means pulseaudio configuration. Pulseaudio is the "desktop audio server".
I said that about Ardour because since the version 4, you don't need anymore to start Qjackctl. Ardour does it automatically, that''s why I said I never start Qjack
Sure. In fact, ardour doesn't even need jack anymore: it can use pure alsa. But that option is even less flexible with regards to other programs' audio. On the other hand, when ardour is configured to use jack from its own audio/midi configuration dialog, it will start jackd. However, qjackctl starts jackdbus, which is almost the same but... (see previous post). I think qjackctl -> jackdbus is more convenient for you (it is for me).

Cheers,
Pablo
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

Hi Pablo, solved.
Maybe somebody having the same problem as mine can find this useful.
I started Qjackctl and, in Audacity, I selected Jack in the dropdown list and system in the other dropdown list.
I didn't select it before because I though system meant the onboard sound card, but it doesn't.
Before starting both Qjack and Audacity I turned my Fast Track on, obviously.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

I am glad you solved it!
I started Qjackctl and, in Audacity, I selected Jack in the dropdown list and system in the other dropdown list. I didn't select it before because I though system meant the onboard sound card, but it doesn't.
Right. "System" means the audio interface that jack is using. I failed to tell you that, sorry.

Anyway, note that, unlike audacity, there are programs which only use pulseaudio as audio output. Then, when running jack at the same time, qjackctl (starting jackdbus, the default option, and selecting your favourite audio card) and pulseaudio jack sink (via desktop audio setup, speaker icon) is the easiest solution in recent ubuntus.
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

No problem Pablo, it's me being a terrible noob.
And yes, somebody told me that I can only use programs using Jack to listen to the sound through the external sound card.
So, for example, I cannot listen to the sound if using the Rhythmbox since it's not using Jack audio server. Or bus, or whatever it is.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

somebody told me that I can only use programs using Jack to listen to the sound through the external sound card
That is not true.
I cannot listen to the sound if using the Rhythmbox since it's not using Jack audio server
You mean when jack is running, I assume. That's not true either.

Those would be true if pulseaudio jack sink wouldn't exist. But it is there, if you press the speaker icon and you previously started jack via qjackctl using the external (or any else) audio card. I suggest you should try.
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

Pablo do you mean the audio settings that come out when you click the speaker icon on the top bar in Ubuntu?
Because if it's that, it didn't work for me. When I turn the fast track on, connected to the monitors and via USB to the computer, in the list I have Speakers - Internal Audio and two options with Fast Track, channel 1 and channel 2.
But each of the two I select, I hear no sound at all.
I've also tried the "sound try" (I don't know how's the english name), anyways the button in the same window when you can listen to the speakers test, left and right.
No sound at all.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: no sound from sound card

Post by CrocoDuck »

Hi there! My 2 cents:

When using normal audio applications (for example your Browser, Skype or system sounds) your audio streams are routed from applications to the Audio Drivers by PulseAudio. When using JACK applications instead is JACK routing the audio streams. In normal operation, if JACK is running, PulseAudio audio streams are stopped. This is the reason why there isn't audio when JACK is running (a part for JACK aware applications only).

Now, it is possible to configure PulseAudio to stream audio through JACK, so that you can have all the other sounds too while JACK is running, This is easier with the dbus version of JACK. Ubuntu Studio should be configured to do this automatically, but I am afraid that in your case it isn't working for some reason. I am not really aware of how Ubuntu Studio is configured as I don't use it, so I will just drop this here as a reference. Chances are that some Ubuntu user will be able to direct you on PulseAudio + JACK troubleshooting better than I could do given the source I linked.

I would recommend for you to get a clear idea of how Linux Audio works: it is a bit counter intuitive and it requires a bit to get used to, but stick with it and most likely you will be happy at the end :wink:

This article is a must read.
This is a short summary I put together about how Linux audio works.

Hope it helps!
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

Hi Crocodile rock, thank you very much.
Wow, that's very coomplicated for me. Double wow, your guide is quite stunning.
I'm going to study it by tomorrow.
Though the link you post is for Archlinux, I don't know if it might also works for Ubuntu.
Thanks 2k anyways.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: no sound from sound card

Post by Pablo »

Oops, I guess "pulseaudio-module-jack" package is not installed in your system. You can install it via software center or with this command:

Code: Select all

sudo apt install pulseaudio-module-jack
Just in case, restart the computer if the jack sink doesn't show up in audio settings just after installing said package.

EDIT: The article from arch wiki linked by Crocoduck can be confusing for a beginner ubuntu user.
Crocoduck article on "how linux audio works" is very good! Thank you!

The OP is using plain ubuntu, not ubuntustudio. That's why pulseaudio-module-jack is not installed (or this is what I think).
Telover
Established Member
Posts: 42
Joined: Fri Nov 04, 2016 10:18 pm

Re: no sound from sound card

Post by Telover »

True, Pablo. I've installed the Studio once but since I had some problems, not related to music, I removed it and re-installed the plain Ubuntu.
Post Reply