It took me ages to figure out why I wasn't getting sound from my two USB audio interfaces I'm using in QjackCtl -- System Settings > Sound and I found them muted. After reboots they seem to wake up muted, randomly. How can I stop this unexpected behavior? Thank you!
USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Moderators: MattKingUSA, khz
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
You could try unmuting then
Code: Select all
$ sudo alsactl store
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Thank you, merlyn, I'll try this!
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 72
- Joined: Wed Apr 15, 2020 1:18 am
- Has thanked: 2 times
- Been thanked: 15 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
I have experienced similar issues that I effectively worked around by unplugging the USB cable from my interface and plugin it back in after a restart. I am running manjaro and it's more up to date software versions have fixed the problem since then.
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Thank you, Robin Cherry. That won't work in my application, which is in a radio station's broadcast signal chain. If something on the PC gets its underpants in a tangle we can't have someone physically come in at, maybe 3 AM to unplug a cable and reboot. It's gotta come up and hit the ground running when remotely rebooted. So all the ALSA records and playbacks in Ubuntu Studio's System Settings > Audio can't be allowed to arbitrarily mute themselves just because they're having a bad day.
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Merlyn, an update. Yes, sudo alsactl store followed by sudo alsa restore does the job. I can use it in a startup script called by QjackCtl. Thank you for the suggestion. Oh, btw, whatever is causing this PC (Ubuntu Studio) to wake up with one or more ALSA Playback cards in mute state is unknown. I thought it was perhaps due to my 1st Gen Scarlett 6i6 which isn't really very Class-compliant strewing confusion throughout ALSA Land, but no, the unexpected and unwanted behavior (of rebooting with sound cards muted) persists with the 6i6 unconnected.
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
This may be because the cards get a different index -- a different card number -- on each reboot. The default state for alsamixer
is to load up in a muted state. Questionable, perhaps. If the card has a new number, it seems like a new card, and starts up muted.
There is a way to set a fixed index for cards using the text identifier. It is also a reason only to have one soundcard, but I'm sure we can find a workaround.
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Agreed that the default behavior is questionable, (especially since this is Ubuntu Studio after all) but there it is. I do have reason to have more than one soundcard so a text-name workaround sounds like it would be nice to implement.
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
If I understand correctly your setup is working by using the alsactl
script from QJackCtl
?
What is the setup you're using at the moment? If you have two USB soundcards and two instances of Stereo Tool, are you using two instances of JACK?
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Hi, yes -- two sound cards (well three, if you count the computer's motherboard sound card), two Stereo Tools, but one QjackCtl.
The alsactrl restore operation does work. I don't feel that users should have to consider that the OS will mess with their settings, to me this is something that I should be able to set and forget. But that's me and there might be a very good reason why the devs decided to do it differently.
-- Jack Elliott
They'll never take me alive
- erlkönig
- Established Member
- Posts: 210
- Joined: Tue May 31, 2022 8:58 am
- Has thanked: 42 times
- Been thanked: 48 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
A few years ago, with jack1, i was in the same situation to run 2 soundcards under jack. Iirc, the solution was to start them with different server names.
Currently working with
https://www.honeysuckers.rocks/?lang=en
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Thank you Erlkönig. For JACK I do load the cards with their names, such as
Code: Select all
zita-j2a -d hw:CODEC -r 48000 -p 256 -n 2
(Pity that QjackCtl does not display those names in Graph . . . )
But that doesn't do anything on the muted-after-reboot issue that ALSA causes, so I am guessing that you are doing something in ALSA Land when the PC starts up.
-- Jack Elliott
They'll never take me alive
-
- Established Member
- Posts: 57
- Joined: Thu Jul 27, 2023 4:06 pm
- Been thanked: 3 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
I was mistaken -- sudo alsactl restore does not restore the saved settings with all the sound cards unmuted. One of the two USB audio interfaces "wakes up" with its output muted and it has to be unmuted manually in System Settings > Audio.
How can I force the PC to unmute all the sound cards after restart?
Thank you!
-- Jack Elliott
They'll never take me alive
- Loki Harfagr
- Established Member
- Posts: 268
- Joined: Thu Aug 02, 2018 1:28 pm
- Has thanked: 151 times
- Been thanked: 53 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
ThatJackElliott wrote: ↑Tue Aug 15, 2023 9:45 pmI was mistaken -- sudo alsactl restore does not restore the saved settings with all the sound cards unmuted. One of the two USB audio interfaces "wakes up" with its output muted and it has to be unmuted manually in System Settings > Audio.
How can I force the PC to unmute all the sound cards after restart?
Thank you!
maybe try /nrestore/ to force a rescan (some usb awake state might hve had a sleepy start)
Code: Select all
sudo alsactl nrestore
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
ThatJackElliott wrote: ↑Fri Aug 11, 2023 3:53 pmThank you Erlkönig. For JACK I do load the cards with their names, such as
Code: Select all
zita-j2a -d hw:CODEC -r 48000 -p 256 -n 2
(Pity that QjackCtl does not display those names in Graph . . . )
It is possible to name a zita-j2a
client. Use -j
then the name you want.
For the muting thing there's amixer
which can unmute cards, and you could put that in a script. Try
Code: Select all
$ man amixer