I was getting the annoying hardware connect sound and then hardware disconnect sound repeatedly every 7 seconds or so on my Windows 10 machine when the monitor went into sleep mode. I messed with the sound settings and sleep mode, but didn’t get it stop doing it. I was able to fix it from this thread.

https://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/monitor-sleep-mode-makes-computer-play-device/6078084f-a8d0-4e69-bdcc-fe71948df681

The answer turned out to be the monitor. I have dual monitors. One is a Samsung TV and the other is a I-INC. It turned out to be the I-INC monitor. On the monitor go into its menu and set the input of the DVI to not be auto.

I hope this helps someone else out there…