Audio not working

I have a mini Meercat computer from System76. Out of the box, sound worked with PopOS installed. Since installing Endless OS 3.9.3, I haven’t been able to get sound working. Here is my eos-diagnostics file:
eos-diagnostic-210415_081210_UTC-0600.txt (1.6 MB)

Here is the output from alsa-info:
http://alsa-project.org/db/?f=ef8d12ceca2e0841c3990b641c56006d16e507d7

In the Sound section of the Settings app, Dummy Output is the only thing that shows up as an output device. The speakers seem to pop or crackle occasionally. Sometimes it seems timed with restarting pulseaudio. No sound comes out of the speakers, though, when playing anything.

Any help you can provide is appreciated!

Can you please post the output of the following command:

cat /proc/asound/cards 

then, for every card listed there (starting with 0), please the output of:

amixer -cNUMBER

where NUMBER is the index of the card (e.g. 0, 1, …). And lastly:

aplay -L
$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x6023110000 irq 162
$ amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 60 [69%] [-20.25dB] [on]
  Front Right: Playback 60 [69%] [-20.25dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Internal Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [on]
Simple mixer control 'Internal Mic 1',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Internal Mic Boost',1
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Playback/recording through the PulseAudio sound server
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Hardware device with all software conversions
sysdefault:CARD=PCH
    HDA Intel PCH, ALC256 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dmix:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample mixing device
dmix:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample mixing device
dmix:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Direct sample mixing device
dmix:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Direct sample mixing device
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output

Can you please run:

echo -e "AUDIODRIVER=alsa\nAUDIODEV=hw:0" | sudo tee -a /etc/environment

then, reboot your machine. Does the sound work?

(Reference: https://community.clearlinux.org/t/can-not-get-intel-hda-sound-to-work/5057/5, seems that many NUC owners have similar issues)

I don’t seem to have an alsa executable on my machine.

The command

find / -name alsa -type f

doesn’t find anything. Why would that be missing?

Despite the alsa executable not existing, I tried your commands without success. Shouldn’t there be an alsa command installed? Normally I’d use apt-get to reinstall whatever package, but I don’t know what to do on Endless.

No, there isn’t a alsa command, some of the more often used ALSA commands include amixer and aplay. EOS is a little different in the aspect of installing sotware, as it uses a OSTree based read-only filesystem (OSTree is to Operating systems what is GIT to developers).

So to install other software, your options are to either use something from the App Center (which is Flathub essentially), to build your own Flatpak or to use Podman to run Ubuntu/Fedora Software
.

Back to your issue: It’s probably because of some quirk in the way ALSAs driver for your Codec (ALC256) talks to the NUCs hardware. Such issues are very problematic to analyze remotely. I would recommend you to work through https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting to see if you can work out the issue and report back your findings.

Based on this:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I was able to successfully use this command to hear the sound played out of my speakers:
aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Center.wav

Without the -D plughw:0,0, it doesn’t work. I tried creating a ~/.asoundrc file with:

defaults.pcm.card 0
defaults.pcm.device 0
defaults.ctl.card 0

and

pcm.!default {
    type hw
    card 0
    device 0
}

But neither did anything. Any ideas?

It works! I installed and opened the PulseAudio Volume Control app. Under the Configuration tab, I selected Analog Stereo Output (unplugged) (unavailable). After selecting that, under Output Devices, there now is now a Headphones (unplugged) entry and adjusting the volume for it works.

Thank you for working out a solution and sharing it, maybe it can help others with a NUC too!

Thank you for the help!

With some help from System76 I was able to get the correct solution:

Create /etc/modprobe.d/system76-alsa-base.conf and add the following line:

options snd-hda-intel model=alc256-asus-mic

This was suggested in the link provided by egrath, but I couldn’t figure out the proper model until now. I can now use both my mic and my headphones at the same time and the Settings app and PulseAudio Volume Control both correctly report Input and Output devices.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.