AMD Renoir: Internal microphone not working after returning from hibernation

Hi guys,

I have a HP ENVY x360 Convertible 13-ay0xxx (Ryzen 3 4300u) laptop. Given that it only provides “modern standby” which is currently not working (Ryzen 4700U failing to enter suspend/modern-standby correctly (#1230) · Issues · drm / amd · GitLab) I put it into hibernation at the end of the day. Everything resumes fine except for the internal mic.

Now, some clarifications in order to prevent unproductive answers, because I’ve tried many of the proposed workarounds already:

  1. This is not a problem of “mic not working”. The mic works perfectly well until resuming from hibernation. I don’t need to set snd-rn-pci-acp3x dmic_acpi_check=1 at all for the mic to work and it doesn’t fix my problem anyway.

  2. Blacklisting snd-rn-pci-acp3x makes the mic useless from the beginning.

  3. It’s not a mixing problem. Capture is unmuted and at top volume.

I’m currently using kernel 5.12.16 but I’ve tested 5.13.1 and the rc1 of 5.14 also. All the same.

Some relevant output:

inxi -SMA
System:    Host: carlos Kernel: 5.12.16-1-MANJARO x86_64 bits: 64 Desktop: GNOME 40.3 
           Distro: Manjaro Linux 
Machine:   Type: Convertible System: HP product: HP ENVY x360 Convertible 13-ay0xxx 
           v: Type1ProductConfigId serial: <superuser required> 
           Mobo: HP model: 876E v: 12.40 serial: <superuser required> UEFI: Insyde v: F.15 
           date: 11/12/2020 
Audio:     Device-1: AMD driver: snd_hda_intel 
           Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor driver: snd_rn_pci_acp3x 
           Device-3: AMD Family 17h HD Audio driver: snd_hda_intel 
           Sound Server-1: ALSA v: k5.12.16-1-MANJARO running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: ALC245 Analog [ALC245 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: acp [acp], device 0: DMIC capture dmic-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Abridged output of pactl list sources:

Source #0
	State: RUNNING
	Name: alsa_output.pci-0000_04_00.6.HiFi___ucm0003.hw_Generic_1__sink.monitor
	Description: Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Speaker + Headphones
	Driver: module-alsa-card.c

	Properties:
		device.description = "Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Speaker + Headphones"
		device.class = "monitor"
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xd04c0000 irq 72"
		alsa.driver_name = "snd_hda_intel"

Source #1
	State: RUNNING
	Name: alsa_input.pci-0000_04_00.6.HiFi___ucm0003.hw_acp__source
	Description: Family 17h (Models 10h-1fh) HD Audio Controller Digital Microphone
	Driver: module-alsa-card.c
	Properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "DMIC capture dmic-hifi-0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "2"
		alsa.card_name = "acp"
		alsa.long_card_name = "acp"
		alsa.driver_name = "snd_acp3x_rn"
	Ports:
		[In] Mic1: Digital Microphone (type: Mic, priority: 100, availability unknown)
	Active Port: [In] Mic1
	Formats:
		pcm

Source #2
	State: RUNNING
	Name: alsa_input.pci-0000_04_00.6.HiFi___ucm0003.hw_Generic_1__source
	Description: Family 17h (Models 10h-1fh) HD Audio Controller Headphones Stereo Microphone
	Driver: module-alsa-card.c
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC245 Analog"
		alsa.id = "ALC245 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xd04c0000 irq 72"
		alsa.driver_name = "snd_hda_intel"
	Ports:
		[In] Mic2: Headphones Stereo Microphone (type: Mic, priority: 200, not available)
	Active Port: [In] Mic2
	Formats:
		pcm

Source #5
	State: RUNNING
	Name: alsa_output.pci-0000_04_00.1.HiFi___ucm0001.hw_Generic_3__sink.monitor
	Description: Monitor of HD-Audio Generic HDMI / DisplayPort 1 Output
	Driver: module-alsa-card.c
	Properties:
		device.description = "Monitor of HD-Audio Generic HDMI / DisplayPort 1 Output"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xd04c8000 irq 71"
		alsa.driver_name = "snd_hda_intel"

Any clue?

Thanks!

More stuff that doesn’t work: downgrading alsa as in

sudo pacman -U https://archive.archlinux.org/packages/a/alsa-lib-1.2.4-3-x86_64.pkg.tar.zst https://archive.archlinux.org/packages/a/lib32-alsa-lib-1.2.4-2-x86_64.pkg.tar.zst

suggested many times in this forum. Still the same: mic starts fine but wreaks havoc after resuming from hibernation.

I’ve reported the issue to the kernel bug tracker: https://bugzilla.kernel.org/show_bug.cgi?id=213793

:+1: Welcome back to Manjaro! :+1:

  1. Please read this:
    How to provide good information
    and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:

  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.

  3. Have you tried 5.10 LTS (Long Term support) already?

  4. When coming out of hibernation, what is the relevant portion of:

    journalctl --system --boot=0 --priority=err
    

    (I.E. from the exact time you go into hibernation until the end)

:+1:

P.S. If you enter a bit more details in your profile, we can also see which Desktop Environment you’re using, which CPU/GPU or Kernel, … you have without typing it every time

1 Like

Hi Fabby, thanks for answering. The problem seems to be in some code path in the driver while resuming from hibernation that is failing to properly restore its state. I realized that reloading the driver “fixes” the issue. It’s a bit more convoluted than it sounds because of the fact that pulseaudio is auto-restarting all the time. Something like this does the job:

sudo rmmod -f snd-rn-pci-acp3x &
pulseaudio -k
sudo modprobe snd-rn-pci-acp3x &
pulseaudio -k

Otherwise rmmod and modprobe would hang forever. You can also stop the socket at the beginning, this is more amenable to scripting:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
sudo sudo rmmod -f snd-rn-pci-acp3x
sudo modprobe snd-rn-pci-acp3x
systemctl --user start pulseaudio.socket

Anyway it’s a dirty workaround. The issue was reported to the kernel tracker already.

I’m marking this as a solution but I will let you know as soon as I have news from the driver devs.

If you enter a bit more details in your profile, we can also see which Desktop Environment you’re using, which CPU/GPU or Kernel, … you have without typing it every time

Cool, I will do it.

1 Like

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