Dualboot audio issues with Windows/Zorin

Hello, this seems like a frequent question but I am still running into trouble with the audio on a dual boot windows/linux system. I have windows 10 as a primary install and made a partition for Zorin OS 16 Core and I am using Grub2win as a bootloader. Upon installing Zorin, I had issues with my audio (no audio except from headphones (front 3.5mm jack) and HDMI to TV) i.e. my rear 3.5mm jack was not recognised or played sound (despite the settings menu appearing to be playing audio).

I am still very new to linux so I went online for help and found many examples of this issue but many say this should have been fixed in the updated linux kernel.

I jumped into Pavucontrol (changing outputs, disabling the HDMI output, HDAJackRetask (changing audio channels, Jack detection setting), ALSAamixer (checking mute settings, upping volume on all devices), and eventually hda-verb commands. None of these seemed to work (except for the HDA-verb commands, but they also messed up my audio in both Zorin and windows - both front and back 3.5mm jacks say they are unplugged and do not play audio). Now in both Windows and Zorin, only the Nvidia HDMI output is available for audio out.

I have tried this solution which advises to reset ALSA, pulsmixer and to add an option to the ALSA config file, but none of that seems to work for me.

The audio devices in Zorin were jumpy and glitching between the HDMI output and another output which I could not view in the settings. This caused choppy audio when it played through the HDMI to my screen speakers.

Redownloading the Realtek codec in windows did not reset any drivers as I hoped and I still have no way of detecting audio devices plugged into the 3.5mm jacks. The Realtek website also says the driver from there is for older kernels (3.18 or older) so I have not tried that.

Upon looking deeper into the HDA-verb commands I think I have messed up something with the hardware address pins, or the allocation of addresses in the audio bus or audio codec. I have not found a way to reset these to restore my codecs, firmware or anything else back to factory so that I can at least have my sound working in windows again while I try and fix the issues in Zorin. This seems like the primary fault I am dealing with. Is there anyway to undo the HDA-verb commands? Or set them to the right values? How do I find those values?

My audio card is a ALC887 VD. Any advice would be appreciated.

P.S. New to linux

Hello @Utyer_Trucki

Your issue is indeed multi-faceted, and a few things could have gone wrong. Let’s break down your situation step-by-step.

  1. Effects on Windows after running HDA-verb commands: It’s unusual for HDA-verb commands in Linux to affect Windows since they typically affect the current running OS, but it’s possible the commands sent might have affected the firmware on the audio chip (though this is extremely rare).

  2. Undo HDA-verb commands: HDA-verb itself doesn’t have an “undo” command. But, considering it sends direct commands to the HD audio hardware, if you accidentally modified something, a hardware reset (like completely shutting down your PC and then turning it back on) should ideally undo the effects of any HDA-verb command, at least temporarily.

  3. Restore Sound in Windows:

    • Ensure your PC is fully turned off (not just a restart). Unplug, wait a few moments, and then plug back and boot to check if the audio devices are detected in Windows.
    • Update Windows. Sometimes, Microsoft releases patches which can fix unexpected issues.
    • Check Device Manager to see if any audio device is showing errors. If yes, try updating or rolling back drivers.
  4. Fix Audio in Zorin OS:

    • Before delving deeper, I’d recommend trying a live boot from a USB drive. If the audio works correctly in the live environment, then it’s likely something in your current installation and not the hardware.
    • Revert any configuration changes you made. This includes any changes in /etc/pulse/ or /etc/alsa/ directories.
    • Check if alsamixer (in terminal) shows all the devices and if there’s any muted channel (a channel is muted if it has MM at the bottom).
    • The aplay -l command will list all playback devices recognized by ALSA.
  5. Finding Correct Pin Configurations:

    • You can refer to your motherboard’s manual. Manufacturers usually have a detailed description of the audio pin layout and configurations.
    • Alternatively, the codecgraph tool can help visualize the HD audio codec layout if you’re feeling adventurous.
  6. Kernel and Driver Updates:

    • Since you’re on Zorin OS 16 Core, you’re likely running a relatively recent kernel. But still, check if any updates are available. Run sudo apt update followed by sudo apt upgrade.
    • Newer kernels often have improved hardware support. You can look into installing a mainline kernel (a newer, not officially supported kernel in Zorin). However, this comes with risks, and it’s recommended to be cautious.
  7. Realtek Drivers: Avoid downloading Linux drivers from manufacturer websites unless explicitly recommended. The Linux kernel and ALSA typically have built-in support for a vast majority of audio chips, and the drivers on websites might be outdated.

In essence, your journey to fixing this will be a blend of isolating the problem (hardware vs. software), trying out solutions in a logical order, and making sure not to make extensive changes without backups or a way to revert them. Given you’re new to Linux, please remember that it’s always good to read and research before making changes, and don’t hesitate to ask the community for help when in doubt.