How to Fix: Realtek USB Audio Delay when Playing Videos

Dennis Faas's picture

Infopackets Reader Mike D. writes:

" Dear Dennis,

I just purchased an AMD Ryzen 9700x (8 core, 16 threat, 65 watt TDP, 4nm) and MSI MAG B650M Mortar WiFi motherboard. The processor is a beast and can handle just about everything I throw at it - plus it stays nice and cool.

Unfortunately, I have an audio lag issue when playing videos. When I click to start a video, it plays the video straight away, but the audio won't start playing until a few seconds later. To be clear, this is not an 'audio out of sync' issue - the audio is muted for a few seconds whenever I start playing a video. The same thing happens if I pause the video, wait a minute or two, then resume. It also happens on anything I play through the browser and not just Youtube videos.

For reference, I have my machine hooked up through a powered HDMI splitter to my monitor as well as my television in another room. The video goes through HDMI and the sound gets delivered to my audio receiver via toslink (also known as optical / SPDIF) in the other room. My previous system didn't exhibit this behavior, so it is definitely something to do with the new motherboard or Realtek audio drivers. All the supposed workarounds on the web don't work for me. This Realtek audio lag when playing videos is super annoying. Please help! "

My response:

I asked Mike if he would like me to connect to his machine using my remote desktop support service, and he agreed.

Below I will discuss my findings.

How to Fix: Realtek USB Audio Delay when Playing Videos

The first thing I tried was the most obvious, which was to update the drivers. Unfortunately this didn't resolve the issue.

After some research, I stumbled across a Reddit post that suggested the Realtek USB audio drivers cause the audio device to go into a 'sleep' state to conserve power and is then re-awakened when a video starts playing. This causes a perceived audio delay over toslink when playing videos.

A quick but wonderful solution to this problem is to download a freeware program called Sound Keeper. This gem of a program prevents the audio chipset from entering into a sleep state, thus removing the audio delay issue. I believe it achieves this by playing inaudible sound constantly.

From the website:

"[Soundkeeper prevents] SPDIF/HDMI/Bluetooth digital audio playback devices from sleeping. Uses WASAPI, requires Windows 7+. It doesn't have GUI and starts to do its job right after the program is started. To make it autorun, copy the soundkeeper.exe into the startup directory that you can access by pressing Win+R and entering shell:startup. To close the program, run the soundkeeper.exe kill command or just kill its process."

https://veg.by/en/projects/soundkeeper/

How to Run Sound Keeper at Startup using Task Scheduler

I suggest running this program at startup whenever the machine boots so you don't have to manually invoke it each time. You can automate this using Task Scheduler.

Here are the steps:

  1. Download Sound Keeper to your machine.
     
  2. Extract the package in your download folder. Make a new folder called "C:\Program Files\Sound Keeper". Move all the extracted Sound Keeper files into there.
     
  3. Set up a new task using Task Scheduler. To do so, click Start, then type in "task scheduler" (no quotes); wait for Task Scheduler to appear and click it.
     
  4. Next, right click "Task Scheduler Library" and select "Create Task".
     
  5. In the General tab, name the task (e.g., "Start SoundKeeper64 at Startup"). Select "Run whether user is logged on or not".
     
  6. In the Triggers tab, select "At startup" from the "Begin the task" drop down menu.
     
  7. In the Actions tab, browser to where Sound Keeper is stored and select SoundKeeper64.exe assuming your machine is 64-bit (most are). There is also a 32-bit and ARM version.
     
  8. In the Conditions tab, un-check "Start the task only if the computer is on AC power".
     
  9. In the Settings tab, un-check "Stop this task if it runs more than 3 days".
     
  10. Click OK.

You can test if it's working by ending Sound Keeper from Task Manager (if it is currently running), then right click the Sound Keeper task in Task Scheduler and run it. Sound Keeper should re-appear in Task Manager. You can also do a reboot and Sound Keeper should be running in Task Manager after you log back in to the machine.

You can also look at another program called SPDIF Keepalive if Sound Keeper doesn't work for you, though Sound Keeper is the most up to date. Look for "SPDIFKA.exe" under the Assets title.

I hope that helps.

About the author: Dennis Faas is the CEO and owner of Infopackets.com. Since 2001, Dennis has dedicated his entire professional career helping others with technology-related issues with his unique style of writing in the form of questions-and-answers; click here to read all 2,000+ of Dennis' articles online this site. In 2014, Dennis shifted his focus to cyber crime mitigation, including technical support fraud and in 2019, online blackmail. Dennis has received many accolades during his tenure: click here to view Dennis' credentials online DennisFaas.com; click here to see Dennis' Bachelor's Degree in Computer Science (1999); click here to read an article written about Dennis by Alan Gardyne of Associate Programs (2003). And finally, click here to view a recommendation for Dennis' services from the University of Florida (dated 2006).

Rate this article: 
Average: 5 (3 votes)