Hi,
Thank you for sharing your question. I understand how aggravating it is to lose your onboard audio with a Code 45 error after every cold boot, and I appreciate you reaching out for help.
It appears that Windows intermittently fails to detect your Realtek high-definition audio hardware, which leads to the “Currently, this hardware device is not connected” Code 45 message.
To resolve this, start by checking in Device Manager with View → Show hidden devices enabled; if High Definition Audio reappears, right-click and Uninstall device, then restart to let Windows reinstall the driver. If reinstalling triggers instability, obtain the latest OEM Realtek drivers directly from the Gigabyte B450 DS3H Wi‑Fi support site—generic or forced drivers may not be fully compatible.
Also, verify that onboard audio remains enabled in your BIOS, as it can reset after updates or boot—and then confirm in BIOS or UEFI that “HD Audio Controller” is still active.
If the problem persists after driver cleanup and BIOS checks, consider two additional steps: use pnputil to remove any stale driver packages from the Driver Store, and configure Windows Update to prevent automatic installation of problematic drivers.
I hope this helps.
Best Regards,
Noel