I just set up pc with MSI mag z590. it has Realtek® ALC4080 Codec. The headset jack which placed the front panel does not work. I search for old questions. I found this closest question. Unfortunately, there is no answer. A headset is defined on my sound settings but the sound does not come. my kernel 5.11.0-43-generic and ubuntu ver 20.04 LTS. I can get sound with a Bluetooth headset.
2 Answers
Update: Once my Ubuntu has updated the alsa package to version 1.2.8 (check with the command alsaucm --version
) I was able to make my card work just by installing alsa-ucm-conf version 1.2.10 with the instructions they provided in this README. Remember to run the tar xvzf
command from the instructions with sudo
. Once you are done, reboot, enjoy!
I had the same issue and fixed it with the latest alsa UCM configuration. The alsa UCM configuration comes from the alsa-ucm-conf
package. Updates to the alsa-ucm-conf
package will wipeout the modifications you are doing here, so make backups and keep notes of what worked so you can easily restore your changes after eventual updates to alsa-ucm-conf
. My fix is very similar to the other one that's listed here, however it manages to avoid the need to install a new version of alsa-lib. Other people landing here should know that it also depends on the motherboard you have, but I'll cover that as well. The ALC4080 chipset appears as a USB Audio device, so keep that in mind.
Now look at the file ucm2/USB-Audio/USB-Audio.conf specifically at the If.realtek-alc4080
block (delimited by the outside braces). If you see your motherboard in the comments, great! You can just use the block as is and skip the next step.
If you don't see your motherboard, don't worry, we'll still get it working. Run the following command:
lsusb
You'll need to extract from there the id of your USB Audio card. It's different on every motherboard. Here's what mine looks like:
Bus 001 Device 002: ID 42ab:4a5c ASUSTek Computer, Inc. USB Audio
So mine is 42ab:4a5c
. Remember to look for the line that contains "USB Audio". If you see multiple lines with USB Audio, you might have some USB headset or audio device, unplug it then try again.
Now edit /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf
on your system (save a backup before doing it to be on the safe side) and add the entire If.realtek-alc4080
block from ucm2/USB-Audio/USB-Audio.conf including the If.realtek-alc4080
text to your USB-Audio.conf
file.
If you're motherboard is not listed, replace the entire line starting with Regex "USB(..."
with Regex "USB<your usb id from lsusb>"
. So for my motherboard it would be Regex "USB42ab:4a5c"
Then copy ALC4080.conf and ALC4080-HiFi.conf to /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080.conf
and /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
respectively.
What you are doing copying these files is basically providing alsa with the configuration necessary to understand how to communicate with the ALC4080 chipset.
Now we have to figure out if your alsa's libraries can understand these configuration files. These steps are necessary because the syntax used in these files is "new" syntax (syntax 6 apparently) which only newer alsa libs can understand (I don't know exactly which version). Lets try to load this new configuration and see if it works.
alsaucm -i
open USB-Audio
listcards
The command alsaucm -i
takes you to the interactive mode of alsaucm
. Then with open USB-Audio
you are telling it to try and load configuration for USB Audio. If at this point you get errors, we'll need to edit the configuration files to take out the syntax it cannot understand. If you get no errors and see some nice output after running listcards
, congratulations, restart and try out your Audio capabilities.
If however you get errors, you'll need to edit /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080.conf
and replace everything with
Comment "USB-audio on Realtek ALC4080"
SectionUseCase."HiFi" {
File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
Comment "HiFi 2.0 Channels"
}
# SectionUseCase."HiFi 5+1" {
# File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
# Comment "HiFi 5.1 channels"
# }
# SectionUseCase."HiFi 7+1" {
# File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
# Comment "HiFi 7.1 channels"
# }
This is my attempt at translating to the old syntax style. You also need to edit /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
and remove the 2 lines that start with Variant."HiFi....
.
Now, if you've been paying attention you've probably noticed that ALC4080 has 3 operating modes. These operating modes are describe in my motherboard manual, the 3 operating modes are either 2.0 channels, or 5+1 or 7+1. In future versions of the alsa-ucm-conf
these will work separately. But right now we'll have to hardcode one of those modes. In case you are just using your headset, you can skip changing the PlaybackChannels
and move to the validation step below. In case you are using 5+1 you'll need to replace the PlaybackChannels 2
line with PlaybackChannels 6
and if you are using 7+1, then you'll have to replace it with PlaybackChannels 8
. You can also do this by commenting/uncommenting lines (a comment starts with #
) as it was done in the new ALC4080.conf
above. You may also comment/uncomment the appropriate section for you in ALC4080.conf
above if you want to see the appropriate title, although it is not strictly necessary. Unfortunately I don't know this format well enough to provide a solution for all 3 modes of operation. So if you want to switch between them, you'll need to edit these files appropriately and restart your computer.
Now let's try again to validate the configuration. Run these again
alsaucm -i
open USB-Audio
listcards
You should not get any errors and upon running listcards you should see a card listed, probably called "Generic USB Audio". This should finally work now. Restart and check to see if it works.

- 31
-
Tried this, but still it gives me errors:
ALSA lib parser.c:2021:(parse_master_file) Incompatible syntax 6 in USB-Audio.conf
andALSA lib main.c:1412:(snd_use_case_mgr_open) error: failed to import USB-Audio use case configuration -22
– Nicholas Redi Dec 13 '23 at 08:56 -
do
alsaucm --version
to see version. If you have version1.2.7
or above it should probably be easier than the instructions above. This is because, from what I gather from the Alsa project changelogs it seems like syntax 6 is supported by this version and up. In this case, all you need to do is install a more recent alsa-ucm package like 1.2.9 or 1.2.10. Search for your MoBo in the changelogs. – Tudor Sidea Dec 14 '23 at 15:16 -
alsaucm --version
reports1.2.8
version and I confirm I can see my MoBo (MSI MAG Z690 Tomahawk Wifi) in the changelogs related to this version. – Nicholas Redi Dec 15 '23 at 08:48 -
@NicholasRedi it should work for you then. I think your issue is different and probably the instructions on this page won't help. Probably try to play around with switching Audio Profiles from your Audio section in System Settings or from your System Tray. I use headsets, so I need the "HiFi 2.0 channels" profile. If i'd be using a nicer setup with more jacks, I'd probably need "HiFi 5.1 channels" or even "HiFi 7.1 channels". Take a look at your mobo manual to see all the different audio setups that you can have with the ALC4080. – Tudor Sidea Dec 16 '23 at 10:08
-
Thanks! It worked for me. Despite my mobo (ROG STRIX B650-A GAMING WIFI) was not listed in the comments section, it had the same ID (
0b05:1a52
) as ASUS ROG Strix X670E-F and Z790-E Gaming Wifi. I'm a lucky man. – felipsmartins Mar 11 '24 at 01:31
I had and fixed the the same issue, and tl;dr you're probably better off waiting for the latest alsa version to make it into a stable ubuntu repo than trying to fix it now.
If you want to fix it now, here's what I did:
First, you can rule out wiring & codec issues by playing audio directly through
aplay
(source):aplay -D plughw:Audio,1 /usr/share/sounds/alsa/Front_Left.wav
Once you have verified that, you can look at the latest USB-Audio config in the
alas-ucm-conf
repo for your board.lsusb | grep -i audio
will also help you find the exact USB ID and match it to the regex there, as will various related GH issuesThen you have to somehow get the latest config + a version of
alsa-lib
that can parse it.
The former is easy - just clone the repo, checkout master or1.2.7.2
, and run the following from the root of the repo:git clone https://github.com/alsa-project/alsa-ucm-conf && cd alsa-ucm-conf # git checkout 1.2.7.2 if you don't want master # take a a backup sudo mv /usr/share/alsa/ucm2 /usr/share/alsa/ucm2_bak/ # link ucm2 config to the shared config dir sudo ln -s `pwd`/ucm2 /usr/share/alsa/ucm2
Installing a version of
alsa-lib
that can actually parse the config is more tedious, which is why I recommend waiting. Probably best to build from source (not what I did, see 1).Finally, once you have both the config and a version of the library that can parse it:
alsaucm reload pulseaudio -k && pulseaudio -D
Hope that all helps.
1: Instead of building from source, I didn't know what I was doing, so I naively added bookworm to my /etc/apt/sources.list
so I could get alsa-utils 1.2.7.1, which somehow broke my DNS resolver so I strongly recommend not doing this.
Again, probably installing from source is the way to go but I haven't seen any advice on how to do so.

- 121
-
Had the same problem with a GigaByte B6501 Aoris Ultra, and Arch linux. Luckily Arch has the latest version of alsa libs, so I just needed to replace my ucm2 directory with the copy from github. Thanks for great instructions! – M Conrad May 04 '23 at 23:06
sudo lshw -C sound
it will show both the product chipset as well as the driver it is loading for it. – Terrance Jan 02 '22 at 02:57description: Audio device product: USB Audio vendor: Generic physical id: 5 bus info: usb@1:5 version: 0.03 capabilities: usb-2.00 audio-control configuration: driver=snd-usb-audio maxpower=100mA speed=480Mbit/s – Burak Esen Jan 02 '22 at 04:20
https://bbs.archlinux.org/viewtopic.php?id=272523
– stason Mar 31 '22 at 03:41