Has anybody gotten audio working in Linux on Aorus X570 Master?

What the hell… I was gearing up to try the suggestions in the answers when I tried selecting my “Headphones” port in pavucontrol:

Now the audio is coming out my speakers perfectly clear :confused:

I’m certain I’ve tried that before with no luck…

Definitely some bugs here indeed.

A guy posted just a few days ago on the thread you linked saying he patched the issue:

Have you tried this?

EDIT: It works!!!

(EDIT: I spoke too soon. It sorta worked for a few reboots, but now it’s borked again in a different way. More testing is necessary I guess, but the work-around I posted above no longer works with this kernel patch applied)

Summary

Yes, it does seem to work!
Selecting “Line Out” as a source works. Plugging-in headphones into the jack on the front of the case automatically switches sound to the headphones, and unplugging it returns sound back to the line-out.

I was able to successfully patch this into kernel 5.4.23 on Ubuntu 18.04.

Aw… Got me real hyped for a moment there :grin:

I’ve never tried compiling my own kernel on Arch before, guess this is a good time to give it a shot.

1 Like

I’d say give it a try. I did get it to work once, but then it stopped working so I might have done something wrong (I haven’t compiled my own kernel for years).

I have a Gigabyte Z390 AORUS Master with the same issue. Pulseaudio correctly detects which port is being plugged in, but output is sent to the wrong port. To make matters worse, the NVIDIA HDMI sound uses the same kernel module, which tends to confuse pulseaudio as to which device is being used.

Here’s what I did:

  • run pavucontrol
  • under the Configuration tab (all the way to the right - it might not be visible initially), disable any audio devices you don’t intend to use
  • under the Output Devices tab, select Port: Headphones (unplugged)
  • To make the change permanent, edit (with elevated privileges) /etc/pulse/default.pa and add ‘set-sink-port 0 analog-output-headphones’ to the end of the file to set it as the default output.

To list all of the details of your sound devices, you can run pactl list cards. When referencing the device number in /etc/pulse/default.pa, be sure to use the value under alsa.card and NOT the initial ‘Card #’ listing. In my case Card#0 was alsa.card = “1” and vice versa.

2 Likes

Thanks! I have an Nvidia GPU as well, so maybe that’s a contributing factor. I’ll give it a try.

1 Like

OK, so here’s what I’ve found: The reason the kernel patch worked the first time I tried it is because the Nvidia drivers weren’t being loaded.

I tried another kernel compile, and the patch just didn’t work. Using Sea_Monkey’s post as an idea, I decided to remove the Nvidia drivers and BAM. Just like magic, the sound is working as expected.

Now I’m going to test with my old AMD video card and see what happens.

2 Likes

Yep, audio is fine with an AMD card installed so there’s some sort of conflict there related to Nvidia.

Hooray for binary drivers! :confused:

1 Like

Hi there,
I am the original author of the audio kernel patch and am trying to reproduce your problems with my patch.
I have this patch running for quite some time now and it always worked reliably for me. All it does is apply a quirk for the ALC1220 similar to what other devices like Clevo or MSI laptops need. I don’t see how this interferes with the nvidia binary blobs but I am willing to try investigate this.
Another note, could it be that the previously applied HDAJackRetask workarounds are still intact? These must be disabled as they are obsolete with my patch.
cheers, chris

2 Likes

Just going to quote Sea_Monkey from further up in case you didn’t read that far :slight_smile:

I have no clue about kernel modules though so I have no idea if this matters.

Hi,
yeah, I just saw it too. I was a bit in a hurry before and did not see that response.
Alright, time to grab some nvidia gpu and see what is going on. I am running on an RX580 so no wonder I did not hit this problem.

I hope I can find some time this weekend. Thanks for the input.
cheers, chris

UPDATE: I have a hard time finding a suitable NVidia card to test your problem. What exact GPUs do you guys have? All I have right now is an old Quadro FX 380 which only has DisplayPort and DVI outputs - but no HDMI. However, it has audio support so it may still be a viable test-canidate. I hope I don’t have to buy a GPU…

2 Likes

@Sea_Monkey @DigitalYeti

Just thought I should ping you guys in case you don’t otherwise get notifications :slight_smile:

Please see gladiac’s answer above.

Alright, so I got home and tried my old Quadro FX 380 first with nouveau and then with NVidia 340.108 drivers. I even had to backport my patch to 5.4 and compile the older kernel because the nvidia blob wouldn’t build on 5.5. Audio was working fine in both situations.

However, I have one suggestion. Please investigate your audio devices and mixer controls. Try playing around with pavucontrol. It is quite possible your internal audio is just muted or the HDMI port is just the primary audio outlet. Without further information I cannot really troubleshoot this topic right now since I do not have a more modern NVidia card at hand - and really don’t want to spend the money on one. I hope you guys understand.

1 Like

I’m currently following this guide to build a custom kernel, in order to test your patch.

I don’t currently have an Nvidia GPU unfortunately, but I’m buying the GTX 3080 Ti as soon as it comes out. That could be months though. I’ll definitely let you know if I suddenly start having audio issues again at that time :slight_smile:

EDIT: Seems to work perfectly! :grin:

1 Like

I haven’t tried your patch, as I already implemented my own working solution posted above, but for what it’s worth…

Card #0
	Name: alsa_card.pci-0000_01_00.1
	Driver: module-alsa-card.c
	Owner Module: 7
	Properties:
		alsa.card = "1"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0x53080000 irq 17"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:01:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
		device.bus = "pci"
		device.vendor.id = "10de"
		device.vendor.name = "NVIDIA Corporation"
		device.product.id = "10ef"
		device.product.name = "GP102 HDMI Audio Controller"
		device.string = "1"
		device.description = "GP102 HDMI Audio Controller"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Profiles:
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5400, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 300, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 300, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5200, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 100, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 100, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5200, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 100, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 100, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5200, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 100, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 100, available: no)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: off
	Ports:
		hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "video-display"
			Part of profile(s): output:hdmi-stereo, output:hdmi-surround, output:hdmi-surround71
		hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "video-display"
			Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-surround-extra1, output:hdmi-surround71-extra1
		hdmi-output-2: HDMI / DisplayPort 3 (priority: 5700, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "video-display"
			Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2, output:hdmi-surround71-extra2
		hdmi-output-3: HDMI / DisplayPort 4 (priority: 5600, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "video-display"
			Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3, output:hdmi-surround71-extra3

Card #1
	Name: alsa_card.pci-0000_00_1f.3
	Driver: module-alsa-card.c
	Owner Module: 8
	Properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x53930000 irq 171"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Profiles:
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 60, available: yes)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes)
		output:analog-surround-21: Analog Surround 2.1 Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 860, available: yes)
		output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority: 700, available: yes)
		output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 760, available: yes)
		output:analog-surround-41: Analog Surround 4.1 Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 860, available: yes)
		output:analog-surround-50: Analog Surround 5.0 Output (sinks: 1, sources: 0, priority: 700, available: yes)
		output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 760, available: yes)
		output:analog-surround-51: Analog Surround 5.1 Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 860, available: yes)
		output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority: 5500, available: yes)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5560, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:analog-stereo+input:analog-stereo
	Ports:
		analog-input-front-mic: Front Microphone (priority: 8500, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		analog-input-rear-mic: Rear Microphone (priority: 8200, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		analog-input-linein: Line In (priority: 8100, latency offset: 0 usec, available)
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		analog-output-lineout: Line Out (priority: 9900, latency offset: 0 usec, available)
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21, output:analog-surround-21+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo
		analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-headphones"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		iec958-stereo-output: Digital Output (S/PDIF) (priority: 0, latency offset: 0 usec)
			Part of profile(s): output:iec958-stereo, output:iec958-stereo+input:analog-stereo
2 Likes

Hi @Sea_Monkey, could you explain what you did for your solution? I am currently having the same problem and would like to avoid having to compile my own kernel.

My previous post contains everything I did. Is there anything in particular that needs further explanation?

@gladiac

Bad news, I rebooted my PC and now audio has stopped working completely…

I have double checked that I booted the right kernel:

➜ uname -a
Linux aura 5.5.7-arch1-1-audio-patched #2 SMP PREEMPT Thu, 05 Mar 2020 21:27:22 +0000 x86_64 GNU/Linux

Audio works with all my other audio devices, and all audio works if I reboot to Windows. I have not muted the output device or application.

I used to be able to play audio by switching to the Headphones port, but that doesn’t work now.

I can see audio playing in the correct sink in pavucontrol, but no audio is being played through the speakers:

Here’s all my dmesg lines regarding “snd_hda_intel” or “snd_hda_codec_realtek”:

➜ sudo dmesg | grep -F snd_hda_codec_realtek
[    7.931400] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC1220: line_outs=3 (0x1b/0x15/0x16/0x0/0x0) type:line
[    7.931402] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    7.931403] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[    7.931404] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    7.931404] snd_hda_codec_realtek hdaudioC1D0:    dig-out=0x1e/0x0
[    7.931405] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    7.931406] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19
[    7.931407] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18
[    7.931407] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a
[  708.838443] Modules linked in: rfcomm fuse xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter bridge overlay md4 nls_utf8 cifs dns_resolver fscache libdes hid_logitech_hidpp uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mousedev uinput joydev hid_logitech_dj cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel snd_usb_audio bluetooth snd_usbmidi_lib 8021q snd_rawmidi garp mrp snd_seq_device ecdh_generic stp llc mc hid_jabra ecc it87 hwmon_vid nls_iso8859_1 nls_cp437 vfat fat iwlmvm input_leds wmi_bmof mxm_wmi mac80211 snd_hda_codec_realtek edac_mce_amd snd_hda_codec_generic kvm_amd ledtrig_audio libarc4 snd_hda_codec_hdmi snd_hda_intel iwlwifi kvm snd_intel_dspcfg snd_hda_codec irqbypass cfg80211 snd_hda_core snd_hwdep snd_pcm igb snd_timer r8169 snd realtek crct10dif_pclmul ccp libphy rfkill dca crc32_pclmul

➜ sudo dmesg | grep -F snd_hda_intel
[    7.908436] snd_hda_intel 0000:0e:00.1: enabling device (0000 -> 0002)
[    7.908571] snd_hda_intel 0000:0e:00.1: Force to non-snoop mode
[    7.908892] snd_hda_intel 0000:10:00.4: enabling device (0000 -> 0002)
[    7.917605] snd_hda_intel 0000:0e:00.1: bound 0000:0e:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[  708.838443] Modules linked in: rfcomm fuse xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter bridge overlay md4 nls_utf8 cifs dns_resolver fscache libdes hid_logitech_hidpp uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mousedev uinput joydev hid_logitech_dj cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel snd_usb_audio bluetooth snd_usbmidi_lib 8021q snd_rawmidi garp mrp snd_seq_device ecdh_generic stp llc mc hid_jabra ecc it87 hwmon_vid nls_iso8859_1 nls_cp437 vfat fat iwlmvm input_leds wmi_bmof mxm_wmi mac80211 snd_hda_codec_realtek edac_mce_amd snd_hda_codec_generic kvm_amd ledtrig_audio libarc4 snd_hda_codec_hdmi snd_hda_intel iwlwifi kvm snd_intel_dspcfg snd_hda_codec irqbypass cfg80211 snd_hda_core snd_hwdep snd_pcm igb snd_timer r8169 snd realtek crct10dif_pclmul ccp libphy rfkill dca crc32_pclmul

Is there any other information I can provide?

@Hubro *sigh* bad news, indeed. I have never had any issues like that and I am running my setup with my fix for many weeks on a daily basis now. This is a real mystery to me. I would not have suggested and submitted the patch on LKML if it had not run perfectly for quite some time.

Have you tried ruling PulseAudio out completely by temporarily disabling its operation and trying to play a WAV directly via ALSA using aplay (ALSA play)? There is a nice little example on Archwiki which outlines how this can be done. Just follow the same logic of the wiki but instead of searching for the HDMI output use the “ALC1220 Analog” audio and also make sure PulseAudio is not running by invoking pulseaudio -k before. Example:

$ pulseaudio -k
$ aplay -l|grep 'ALC1220 Analog'
card 2: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
$ aplay -D plughw:2,0 /usr/share/sounds/alsa/Front_Right.wav

The example uses “plughw:2,0” because on my machine the “ALC1220 Analog” audio has card #2 and the device has #0 (see the output of my aplay -l. You should hear a voice saying “Front Right”. A little advice: on many (all?) configurations, PulseAudio will automatically respawn after being killed. To temporarily disable this mechanism you can just do the following:

$ echo 'autospawn = no' >> ~/.config/pulse/client.conf

Just make sure to remove this line after testing.

Good luck.