Page 1 of 2
USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Thu Aug 03, 2023 8:42 pm
by ThatJackElliott
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!
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Thu Aug 03, 2023 9:46 pm
by merlyn
You could try unmuting then
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 04, 2023 7:05 pm
by ThatJackElliott
Thank you, merlyn, I'll try this!
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 04, 2023 8:25 pm
by Robin Cherry
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 04, 2023 8:33 pm
by ThatJackElliott
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Thu Aug 10, 2023 2:22 pm
by ThatJackElliott
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Thu Aug 10, 2023 7:48 pm
by merlyn
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Thu Aug 10, 2023 9:23 pm
by ThatJackElliott
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 11, 2023 10:48 am
by merlyn
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?
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 11, 2023 1:52 pm
by ThatJackElliott
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 11, 2023 3:47 pm
by erlkönig
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Fri Aug 11, 2023 3:53 pm
by ThatJackElliott
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.
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Tue Aug 15, 2023 9:45 pm
by ThatJackElliott
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!
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Wed Aug 16, 2023 7:44 am
by Loki Harfagr
ThatJackElliott wrote: ↑Tue Aug 15, 2023 9:45 pm
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!
maybe try /nrestore/ to force a rescan (some usb awake state might hve had a sleepy start)
Re: USB audio interfaces mute when Ubuntu Studio 22.04 reboots - weird
Posted: Wed Aug 16, 2023 9:26 am
by merlyn
ThatJackElliott wrote: ↑Fri Aug 11, 2023 3:53 pm
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 . . . )
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