You are not logged in.

#1 2024-04-12 22:47:13

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Audio Issues Since Install

Hello

I'm new to Arch and new to Linux in a non-server environment. A few months ago I installed Arch on my new laptop, and while most things have worked perfectly I haven't been able to get sound to work. The system is a few months old now, but the issue has existed since I installed it, so it isn't new.

Having spent several hours trying to debug this issue I suspect there is a simple solution, but I don't know what I don't know.

Diagnostic information:

This is an HP Omen laptop

speaker-test

yields no audio and produces the error

speaker-test 1.2.11

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

(This is true regardless of whether the system has something in its audio jack, a usb audio device, is connected over hdmi, or only has internal speakers)

aplay -l

gives

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
lspci | grep -i 'audio'

gives

00:1f.3 Multimedia audio controller: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
01:00.1 Audio device: NVIDIA Corporation GA106 High Definition Audio Controller (rev a1)

alsamixer displays information that appears to align with the output from

aplay -l

Specifically, it shows only 1 card "HDA NVidia" with four channels, all on.

This also isn't (exclusively, anyway) a hardware issue, since the windows installer that came on the device was perfectly fine talking to me while I was restarting it repeatedly trying to figure out how to boot to BIOS.

The fact that lspci lists two devices is interesting, since one of them doesn't seem to show up anywhere else, but I'm not sure what to do with that. I can't seem to find useful answers when searching.


Hoping someone can clarify what's going on and if not solve the issue at least point me to where I can get more information about how Linux handles sound.

Offline

#2 2024-04-13 12:45:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,806

Re: Audio Issues Since Install

Likely sof-firmware missing, maybe post

sudo dmesg | grep -E  'snd|sof'

Online

#3 2024-04-13 13:47:58

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Re: Audio Issues Since Install

Well that produced some fascinating new errors

[    0.031153] software IO TLB: area num 16.
[    1.068461] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.068462] software IO TLB: mapped [mem 0x000000004673f000-0x000000004a73f000] (64MB)
[    1.153218] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[    1.153228] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[    4.428887] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    4.428956] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[    4.585634] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    4.585864] snd_hda_intel 0000:01:00.1: Disabling MSI
[    4.585872] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    4.667917] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    4.667987] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[    4.668000] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.668243] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    4.668302] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.675049] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[    4.685405] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[    4.685406] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[    4.686304] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.686305] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    4.686307] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    4.781572] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.781575] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    4.797413] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[    4.797464] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI HDA3.OUT stream iDisp4
[    4.797466] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : HDA3.OUT stream iDisp4
[    4.797468] sof_sdw sof_sdw: ASoC: failed to load widget HDA3.OUT
[    4.797469] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[    4.797479] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[    4.797481] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[    4.797482] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    4.797489] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
[    4.797532] sof_sdw sof_sdw: snd_soc_register_card failed -22
[    4.797539] sof_sdw: probe of sof_sdw failed with error -22

I don't know what to make of this. For whatever it's worth I did install the sof-firmware package when I installed (although maybe that's not what you mean by sof-firmare missing?)

Offline

#4 2024-04-14 13:33:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,806

Re: Audio Issues Since Install

That is what I meant and it can't properly load the firmware, AFAIK HP Omens are notorious for a broken verb table... a quick fix attempt that is going to break mic support but might give you speakers is creating a file in /etc/modprobe.d/switchDSPdriver.conf

options snd_intel_dspcfg dsp_driver=1

and rebooting.

Online

#5 2024-04-14 14:18:20

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Re: Audio Issues Since Install

That produced interesting results, but still no sound.

speaker-test is still failing in exactly the same way as before.

aplay -l now shows both cards:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

as is alsamixer which now shows both, defaulting to "Intel Alderlake-P HDMI" and has all four channels "S/PDIF" through "S/PDIF 3" all marked as "OO"

sudo dmseg | grep -E 'snd|sof'

is no longer producing the torrent of errors:

[    0.031929] software IO TLB: area num 16.
[    1.078144] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.078144] software IO TLB: mapped [mem 0x000000004673f000-0x000000004a73f000] (64MB)
[    1.158698] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[    1.158707] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[    4.796480] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.796848] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.962269] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    4.962431] snd_hda_intel 0000:01:00.1: Disabling MSI
[    4.962445] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client

This seems like progress? I hope?

Offline

#6 2024-04-21 05:28:32

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Re: Audio Issues Since Install

I'm still poking at this issue with minimal success. Based on trying to trace alsa-lib's code backwards from the error in snd_pcm_dmix_open I suspect the program is dying somewhere in snd_pcm_open_named_slave although I haven't the faintest idea in which of the functions it calls to. Interestingly, the error message

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

which appears when running speaker-test or aplay contains the phrase 'No such file or directory' which does not appear to exist in either the tooling library or alsa-lib's own source code. (Maybe it comes from the kernel, a driver, or some other intermediary?) The fact the message doesn't communicate what file or directory it is expecting makes it difficult to follow that lead. That said, I clearly don't have a strong grasp of how the Alsa project is structured, as I keep hitting spots where I can't trace where some identifier is coming from. For example, snd_config_check_hop appears to be declared in local.h and defined as a macro to snd1_config_check_hop but then I can't find where that is defined. There are a bunch of functions like this.

For whatever it's worth, I don't particularly care about getting speakers specifically to work, if I can get sound in some way (speakers, headphones, usb audio, hdmi, (bluetooth if I have to)) I'll be reasonably happy. (Just in case it would be easier to get one of those other things working) I wonder if the fact that all the mechanisms I've tried don't work suggests there is a problem with alsa (code or configuration) itself?

Offline

#7 2024-04-21 15:58:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,806

Re: Audio Issues Since Install

You don't have a valid sound device on a kernel level and the dsp_driver hack doesn't work anymore on your hardware. You can drop the dsp_driver fix I suggested and ideally create a bug report on the sof-firmware github. Maybe read https://thesofproject.github.io/latest/ … -platforms to figure out what you can do to properly debug.

As for "any other method", anything USB based can generally be expected to work, bluetooth as well, HDMI can be flimsy sometimes. General "best bet" to not rely on your internal soundcard is something with USB/BT

Online

#8 2024-04-21 19:05:22

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Re: Audio Issues Since Install

I've started reading through the link you sent, that looks like it may have useful information (it certainly has information on how I can get more debugging info) You said that something USB can generally be expected to work but when I tried a USB device (granted only one) it didn't "just work." Is there something that I would need to do beyond plugging in the device to make the machine register it? (E.g. do I need to switch to it in some menu?) Same thing goes for HDMI, for that matter, although you suggested it would be more flimsy. I haven't tried bluetooth yet because I don't own such a device and it seemed like it would require a bunch of configuration regardless, but I might if I run out of other ideas.

Offline

#9 2024-04-21 22:19:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,806

Re: Audio Issues Since Install

Assuming you're using pipewire or pulseaudio, I suggest you look into pavucontrol for switching devices and where which audio source plays back to. Just plain ALSA is a bit more cumbersome in general, and most of the relevant switching methods there become obsolete if you're using pulse or pipewire. If you want to do that anyway, see: https://wiki.archlinux.org/title/Advanc … sound_card

Online

#10 2024-04-22 01:04:55

bricknumber5
Member
Registered: 2024-04-12
Posts: 6

Re: Audio Issues Since Install

It turns out the USB audio device I tried earlier wasn't really a USB audio device (the USB was just for lights, which seems like a waste) Having now acquired a USB audio device it just works. Hooray.

Should I mark this thread as solved if the original issue I was trying to solve isn't actually fixed, I've just found an acceptable workaround?

Oh, and, thank you V1del so much for your help and patience.

Offline

Board footer

Powered by FluxBB