I have HP Omen 15 with Nvidia 1650 Ti and ryzen 5, 4600H, running manjaro unstable with kernel 5.14 and HDMI output seems to be connected to nvidia gpu. everything works fine except for hdmi audio. It doesn’t show up anywhere aplay -l outputs:
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALC245 Analog [ALC245 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
after running this
archlinux. org/title/NVIDIA/Troubleshooting#No_audio_over_HDMI
(I can’t add links, huh?)
kernel log reports: input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card2/input20 but still nothing works.
I don’t really know what to do and any help would be much appreciated.
If you are using an nVidia card with the proprietary prime driver and you get no audio through the HDMI port or the USB devices of the card don’t work it’s because they have been disable due to a power management bug in the kernel. This bug has been fixed in recent updates, so if you are running a kernel with version >= 5.5 and the 4xx version nVidia driver you can fix those problems by editing the file /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules and commenting the following lines in this way.
To go from this:
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
to this:
# Remove NVIDIA USB xHCI Host Controller devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
execute this:
sudo sed -Ei '/"0x040300"/s/^/#/' /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules
sudo sed -Ei '/"0x0c8000"/s/^/#/' /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules
sudo sed -Ei '/"0x0c0330"/s/^/#/' /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules
However, it doesn’t play any sound! I added those to pulseaudio as described here but none of them works. Also, when I run pulseaudio it throws following errors:
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
W: [pulseaudio] cli-command.c: stat('/etc/pulse/default.pa.d'): No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
I added those to pulseaudio as described here but none of them works
The information you linked to in Archwiki is showing how to test audio outputs with an aplay command
so I do not understand what you might have added to PulseAudio
I suggest you remove whatever you have added
reboot system
and post responses this command to show system information
inxi -SMAa
and pulseaudio information
systemctl --user status -l --no-pager pulseaudio.*
Yes, I did that (the first comment in the thread).
I managed to get the audio to work by adding
load-module module-alsa-sink device=hdmi:0
to /etc/pulse/default.pa
However, it seems like on each reboot the number changes! It’s now hdmi:0, then hdmi:0,1 then hdmi:0,4.
Can I make it persistent somehow?
If you check HDMI output Profiles in ‘pactl list cards’ you should be able to deduce the correct HDMI subdevice from HDMI 0 to HDMI 5 and find the related ALSA device number in aplay -l
The sink module device can be specified using the card number and device number
If pactl shows the working device is HDMI 0, use this command in PulseAudio configuration:
load-module module-alsa-sink device=hw:0,3
Or use these hw:[card],[device] numbers for the other devices
I tried adding some of those with load-module module-alsa-sink device=hdmi:0:1
but after I have rebooted it didn’t work. hdmi:0,1 worked though.
It looks like the output device changes after every reboot (ranging from 0 to 4). Can I do something to make it persistent?
device=hdmi:0:1 is an ALSA PCM device from listing in aplay -L
https://alsa.opensrc.org/PCM_device
A PCM device is something like an abstract soundcard. It can either be a hardware device or a PCM plugin layer device
I suspect this would be HDMI 1, so the equivalent hardware device would be device=hw:0,7
(If the 5 HDMI devices are not recognised by, or connected to, PulseAudio the plughw PCM suggested in Archwiki is not needed to work around PulseAudio connections to ALSA)
PulseAudio data is showing only one audio device detected
The HDMI card is only shown in the journal as Failed to find a working profile
the same error repeated 5 times would be the 5 output devices in ALSA
so there is no information about the HDMI card ( alsa_card.pci-0000_01_00.1) in PulseAudio data
The only ALSA card shown in PulseAudio is alsa_card.pci-0000_06_00.6
Which is mostly Card:2 for onboard analog audio - speakers and headset jack
but also Card:3 for the Ryzen Audio CoProcessor digital array microphone
The HiFi profile combines the two cards to appear as only one card in PulseAudio
‘hdmi:0,’ where there is no 2nd ALSA device number may be something misconfigured
The 1st digit is the card number and that can change if audio devices are detected in a different order, but the card numbers don’t change with every single boot
(the card numbers can be fixed in ALSA, but it is less complicated to use the card name instead of the used
I have never known of device numbers changing because they are usually hard-wired to a specific connection. But HDMI connections on a GPU may not be hardwired in the same way
I have been able to find datasheets for some audio codecs, but I have never come across any internal details about GPUs to know what might be going on internally