Windows – How to stop Windows 10 renaming audio devices

audiowindowswindows 10

I have two audio devices and use a bat file with 'nircmd' to change what audio device (and monitor) to use as default. This so I can change from TV (AV Receiver over HDMI) to Monitor (Mainboard Audio device).

Example:

nircmdc.exe setdefaultsounddevice "DENON-AVRHD"

Until recently this worked fine but the last couple of weeks Windows keep changing the name of the device, required by nircmd, and I have to change it manually. For instance it changes to:
DENON-AVRHD-4
DENON-AVRHD-8
DENON-AVRHD-C

Here's an image of my current devices:

Audio Devices

"Speakers" are always the same but the Denon AVR keeps changing almost every boot. I am not sure what has caused this change, possibly drivers (NVIDIA HD Audio) or the recent Windows update.

Is there any way to stop this from happening?

Best Answer

Ok, after some research I've found the reason for the renaming of the audio devices. I had recently connected a new monitor over DisplayPort, and for them to be "Energy Star" compliant, newer monitors have a "deep sleep" feature which makes the computer thing the monitor is disconnected.

When I restarted the computer with the monitor turned off, this forced the display adapter to reconfigure the attached devices, including HDMI/DP audio devices connected to the display adapter. Basically, they were reinstalled and got a new name every time this happened.

Since the devices were reinstalled there was no way to rely on Display ID or index of the devices to change them in a command line, although I could probably use some advanced scripting to use the correct name every time.

The solution was to go into the monitor setup and disable "Deep Sleep" as Asus calls it. This should (hopefully) stop this from happening too often.

See also this answer: https://superuser.com/a/631853/18736

Related Question