Optical Sound on F41W Only Works Sometimes

I’ve installed Fedora 41 Workstation on my desktop, which is using an AsRock X870E Taichi motherboard, which means that the audio chipset is a Realtek ALC4082. My desktop speaker is a Yamaha mini soundbar, which I have plugged into the optical port on the motherboard.

Right now, about half the time, the sound just doesn’t work at all from boot. The system is set to the correct output device and everything is configured correctly, but sound doesn’t come out. One or more reboots eventually fixes the issue, and if the sound is working properly when the machine boots, it stays working until the next boot.

This desktop is dual-booting with Windows 11, and on the Windows end, everything is working correctly.

What’s the best way to troubleshoot this issue?

Here’s a link to my alsa-info results: Dropbox

Maybe running pw-top while it is working and again when it is not working would provide some insights into what is going wrong?

Hm, I tried to run the pulseaudio command as suggested in some other troubleshooting guides, was told that pulseaudio wasn’t installed, and tried to install it. This resulted in some errors and an aborted installation, but the machine now recognizes pulseaudio as being installed, but doesn’t recognize that it has any sound devices attached.

When I run the pulseaudio command now, I get the following result:

W: [pulseaudio] pid.c: Stale PID file, overwriting.
E: [pulseaudio] alsa-ucm.c: Assertion 'dev == data->device' failed at ../src/modules/alsa/alsa-ucm.c:1562, function pa_alsa_ucm_set_port(). Aborting.
Aborted (core dumped)

Fedora Linux switched from pulseaudio to pipewire in release 34.[1]

There is a pipewire-pulseaudio package that maps calls to the pulseaudio API to the equivalent pipewire API, but were possible, you should try to use pipewire/wireplumber directly.

$ rpm -qi pipewire-pulseaudio
Name        : pipewire-pulseaudio
Version     : 1.2.7
Release     : 1.fc41
Architecture: x86_64
Install Date: Tue Jan  7 22:33:43 2025
Group       : Unspecified
Size        : 434070
License     : MIT
Signature   : RSA/SHA256, Tue Nov 26 10:19:36 2024, Key ID d0622462e99d6ad1
Source RPM  : pipewire-1.2.7-1.fc41.src.rpm
Build Date  : Tue Nov 26 10:08:36 2024
Build Host  : buildvm-x86-13.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://pipewire.org/
Bug URL     : https://bugz.fedoraproject.org/pipewire
Summary     : PipeWire PulseAudio implementation
Description :
This package provides a PulseAudio implementation based on PipeWire

  1. ↩︎

Well, that was definitely the wrong troubleshooting guide, then, somehow. I’m starting to think it might be easier to reinstall Fedora than to try and fix whatever’s gone wrong at this point.

Depending on how heavily you’ve customized your OS, reinstalling might well be the easier option. You should be able to keep your home directory and just reinstall the OS (personal settings – background, bookmarks, etc. will be kept). It is always a good idea to make a backup before doing that sort of thing though.

FWIW, I’ve been using wpctl set-default <sink-id> to set my default audio device. Use wpctl status to list the IDs of the detected sources and sinks on your system. I use Sway though. With GNOME you should be able to set it in the Settings app.

Okay, so I wound up reinstalling Fedora, and I wound up back in the same place: sometimes the sound works, and sometimes it doesn’t.

Running pw-top while something is playing shows me… uh, I’m not exactly sure what this information means, but it does seem to recognize that something is going on when I start a YouTube video and that it’s happening in alsa_output.usb-Generic_USB+Audio-00.HiFi__SPDIF__sink + Firefox. Using wpctl seems to indicate that everything is set to the device it should be, it’s just that sound is not coming out.

In order to test this further, I tried swapping out the optical cable for a different one, and then changed over to using analog sound on the same speaker, which wound up having the exact same problem.

Does lsusb list 26ce:0a0b Generic USB Audio and is that device id in the regex for realtek-alc4080 in /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf? If you have the latest system updates, I think it should be, but it is a recent addition.[1]

Edit: There is an interesting comment about getting SPDIF to work for a similar model card:[2]

Now it’s no big problem any more, to get SPDIF working: I just selected the right device and muted all others in alsamixer, except the pcm signal.


  1. ↩︎

  2. ↩︎

It does seem as though at least one person with that problem has more-or-less the same board as me, so it probably is a driver issue with this sound chipset. I’m not familiar with using alsamixer, though; maybe I should just do what one of the other people did and get a simple sound card.

alsamixer isn’t too complicated. It is a terminal app. I would try it first. Here is a screenshot of it running on my PC:

Use your arrow keys to navigate between the the lines. Press the m key to toggle mute on the selected line. Pres the Esc key to exit the application.

Huh, you’re right, and going into the USB Audio card in alsamixer and unmuting PCM 2 gets the sound going again. The weird thing is that PCM 2 just says “00” and it isn’t the one that, based on having numbers next to it, ought to be the one doing the work, but muting PCM, which does seem to be doing the work, doesn’t stop the sound at all.

It also doesn’t stay fixed after a reboot. Is there a way to make it persistent, or am I better off working with a sound card until better support for this chip gets (hopefully) added to the kernel?

EDIT: Okay, alsactl store seems to have done it for now… hopefully. Thanks for the assist!

1 Like