Prevents SPDIF/HDMI digital audio playback devices from sleeping. Uses WASAPI, requires Windows 7+.
To enable autorun, copy soundkeeper.exe into the startup directory (to open it, press Win+R, enter shell:startup, press Enter). To close the program, just mute the Sound Keeper in the Volume Mixer or kill the soundkeeper.exe process.
Download: soundkeeper.7z (23KB). Source code →
- Sound Keeper is fully automatic and doesn't require any user interaction.
- Sound Keeper can keep sound on many sound outputs simultaneously (e.g. SPDIF and HDMI).
- Sound Keeper detects new sound outputs on the fly (e.g. when you connected a TV via HDMI).
- Default behavior can be changed by changing file name of the Sound Keeper executable.
- Primary audio output is used by default. Add All to executable file name to enable Sound Keeper on all outputs.
- Inaudible stream is used by default. Add Zero to executable file name to use stream of digital zeroes (like it was in v1.0.0).
If the default inaudible stream doesn't help, try the new Sine stream type. It generates a sine wave, and can be customized. There are two parameters: F (frequency) and A (amplitude). The value goes right after the parameter character. For example, add SineF10A5 to executable file name to generate 10Hz sine wave with 5% amplitude. Low frequencies (below 20Hz) and high frequencies (above 20000Hz) with low amplitude (up to 10%) are inaudible.
What's new in v1.3.1
- A potential deadlock when audio devices are being added or removed has been fixed.
- Fluctuate treats non-PCM output formats (like Dolby Atmos) as 24-bit instead of 16-bit.
- Frequency parameter F is limited by half of current sample rate to avoid generation of unexpected noise.
- More detailed logs in debug build. Debug output is flushed immediately, so it can be redirected to a file.
What's new in v1.3.0
- Fluctuate is 1 fluctuation per second by default. Frequency can be changed using the F parameter.
- Periodic playing of a sound (parameters L and W) with optional fading (parameter T).
- New White, Brown, and Pink noise signal types.
- Self kill command is added. Run soundkeeper kill to stop running Sound Keeper instance.
- Analog switch was added. It works as the opposite of Digital.
- Ignores remote desktop audio device (this feature can be disabled using the Remote switch).
- New OpenOnly mode that just opens audio output, but doesn't stream anything.
- New NoSleep switch which disables PC sleep detection (Windows 7-10).
- Work as a dummy when no suitable devices found.
- Sound Keeper shouldn't prevent PC from automatic going into sleep mode on Windows 10.
- The program is not confused anymore when PC auto sleep is disabled on Windows 10.
- The workaround that allowed PC to auto sleep had to be disabled on Windows 11.
Sound Keeper vs. SPDIF Keep Alive vs. SPDIF-KA
|Sound Keeper v1.0||SPDIF Keep Alive v1.2||SPDIF-KA v1.4|
|CPU usage (on Intel Core i5 4460):||0.004%||0.06%||0.06%|
|RAM usage (Private Working Set):||1636KB||13704KB||10600KB|
Known issue: streaming audio prevents automatic sleep mode
When a program streams any audio (even silence), the system don't go into sleep mode automatically. Sound Keeper uses the NtPowerInformation(SystemPowerInformation, ...) function to retrieve time when system is going to sleep, and disables itself right before this time. On Windows 7, it works perfectly. Windows 10 waits for 2 minutes more after any sound was streamed, so the PC goes into sleep mode after 2 minutes when Sound Keeper disabled itself. For some reason, Windows 11 always reports that the system is going to sleep in 0 seconds. So, the workaround had to be disabled on this OS until a better solution is found. You can try to use the powercfg to workaround this issue at the system level. Details →
this is another log , i activated the screen auto turn off after 1 min
It is not related to the Sound Keeper. Seems like DMT is Dual Monitor Tools.
its related tp Dual monitors yea , delete that msg
now the issue that i facing is that the soundkeeper shuts off the audio stream when the dsiplay monitor turned off
i setup the auto shutoff of the display after 1 min
after i move the mouse , the display back on and the sound back to the sound bar
using sound bar samsung Q700A
connecting sound bar directly to the pc graphic card hdmi out
I noticed something interesting in the previous log:
I updated the debug version to output more details about this (it should print a GUID of the sample format instead of 0xFFFE). Could you please try to reproduce this again with the newer version and show what it outputs? It seems like one of your audio outputs uses some non-standard audio format.
this error doesn't happen when i choose non dolby atmos quality format
it happens only on this settings : https://i.imgur.com/IKkIEgW.png
do u aware of the sound stop when the display auto sleep activated ? , is this something can be bypassed with the app , or should i search for a method to stop the windows from shutting off the hdmi port
the sound stop on the hdmi port only , its still played on my analog 3.5 speaker
Oh, thank you. I checked if this case is handled properly. Seems like it treats it as 16-bit output in this case, and it should be treated as 24-bit. I'll add support of this output format in the next version.
As far as I know, HDMI is designed in a way that it always turns off both audio and video simultaneously. So, Sound Keeper won't help to overcome it anyhow. If your PC has optical output (S/PDIF) and soundbar has optical input, I would recommend use it instead of passing audio through HDMI. S/PDIF is also digital (same as HDMI audio).
Sameh, I updated the debug version, now it should try to get bit-depth of output format even when it is not a PCM format. Could you please check if it logs correct bit-depth in your case when Dolby Atmos is enabled? It should still complain about unrecognized format (because it is not usual PCM), but at the end of the line it should show that it is 24-bit audio anyway.
Well, it's weird. According to the Microsoft Docs, the 0000000c-0cea-0010-8000-00aa00389b71 GUID is IEC61937_DOLBY_MLP that should be 24-bit. But for some reason it is reported as 16-bit by the system. I'll need to think if it's better to hardcode all known compressed formats with their expected bit-depths instead of relying on values provided by OS.
Or maybe it is always reported as 16-bit for compressed formats. I'll probably treat all of them as 24-bit by default just in case.
veg , another problem , my sound bar went to sleep when my screens gone to sleep
when i back to the pc and on my sound bar , the soundkeeper didnt catch this status change and kept not sending any audio to the bar
plus there is error , i dont know what is it : 10:19:03.307  WARNING: Buggy power information.
Sorry, I'm on vacation now, so won't be able to look into it. I'll be back in January. In any case, it is worth to mention approximate timing when your soundbar and PC went to sleep and when it woke up so I could correlate it with the logs.
veg , happy vacation
i don't see any 'exe', just images and code .
so what file do i have to choose to have it installed?
i'd like to send a screenshot but that's impossible
peter klein, there are just 2 exe files and a txt file in the archive, there are no images nor code. Most probably you downloaded the source code instead of binary distribution.
Sameh, I meant not your settings, but specific timestamp in the log when you turned on your monitor and soundbar, and Sound Keeper didn't generate any sound. Or this moment is actually at the end of the log and it stuck at "Restarting..."? Can you reproduce this issue?
The WARNING: Buggy power information. is expected on Windows 11. This version of Windows doesn't provide information how much time is left until PC goes into sleep mode, so Sound Keeper doesn't monitor if it should stop to output any audio right before PC is going to sleep automatically. This trick is required because by default any sound prevents Windows from automatic sleep.
yes its at this moment : 13:27:41.544  Restarting...
13:27:41.544  Stopping rendering... "
the screens was off , and at this moment i back and i noticed that the log stuck at this info
i will try to reopen the logger again and reproduce it and i will inform u
but i didn't notice it from this moment
by the way , the soundkeeper doesn't prevent my pc from automatic sleeping
Oh, that's really weird that it stuck there, seems like there is nothing that could stop execution at that place. Please tell if you can reproduce this issue. If you can, we could try to figure out what's wrong there by adding more logging to that place.
it happens again
this is the log
i connected the sound bar to my motherboard hdmi not to the graphic card hdmi
i am waiting for ur reply veg
I updated the debug version to output more details in the place where it seems stuck for some reason. Please try to reproduce the issue.
it stopped at this stage
Well, that is really weird. It looks like one of WASAPI cleanup calls is stuck. Could you please make a dump of the Sound Keeper process when it is in such state? You can do it from the standard Task Manager. Right click on the process of the Sound Keeper, Create dump file.
the dump file : https://easyupload.io/gmrotp
the log :
Seems like I found a potential deadlock in WASAPI related code that might be caused by one of small optimizations. I updated the debug version where I temporarily disabled it. Please check if it helps.
BTW, is it easy to reproduce the issue for you? Does it require a few attempts, or it happens always?
it happens too much , every time i return to the pc .. it happens about 80% of the time
If the latest change helps to solve it, I'll release a new version with a fix.
testing it 3-4 days to totally check the fix
i will comment back if the error occur again
Came over here as I am looking for solutions for my DAC (Topping DX1) having clicking sound everytime I play something after idling, read about Soundkeeper from audiosciencereview and some other reddit posts!
I have some questions here:
1. By default, what is Soundkeeper doing after the software starts running? Is it doing the description as 'Fluctuate' mode?
2. If yes, will it affect the audio quality, even if inaudible?
3. SoundKeeperOpenOnly.exe vs SoundKeeperZero.exe, what are the difference? Do OpenOnly plays anything, while Zero still plays something, but in 0hz?
Thanks in advance!
Fluctuate flips the lowest bit in stream of zeroes once per second (by default). It is impossible to hear. Zero plays stream of zeroes. OpenOnly opens audio output device, but doesn't stream anything. All of these modes shouldn't affect audio quality.
Sound Keeper v1.3.1
Thank you so much, VEG!
I've been using PowerShell to play silent WAV (from RAM to save SSD reads as explained in my question at Stack Overflow) to keep my audio device busy but it turned out this causes RAM paged pool leak and the only fix is to purge script from RAM with additional loops. My system's paged pool was reported to be around 8 GB after a week of uptime and the only way to release it was to use RAMMap by SysInternals. Now I can simply rename EXE to SoundKeeperAll.exe, run it and be happy! Wish I knew earlier. I'll feature a link to your app at Stack Overflow so more people are aware.
I'm not sure if it's possible to improve app further, but JFYI PowerShell solution (that leads to memory leak) settles with 0.5 MB of RAM usage (after a while) while SoundKeeperAll.exe consumes 2.1 MB all the time.
A quick follow-up: I used 'Empty' > "Working Sets" in RAMMap and Sound Keeper's RAM usage dropped from 2.2 MB to 0.7 MB while it's perfectly functional. As I stated above, PowerShell that utilizes System.Media.SoundPlayer uses 0.5 MB, 0.7 MB by SoundKeeperAll.exe is reasonable in comparison. While I'm happy with 2.0 MB, maybe you could look into implementing RAM optimization?.. I'll keep an eye on RAM paged pool size in the meantime. Thank you for your time!
P.S. Please discard the follow-up message as emptying working sets in RAMMap does not what I thought it does (SoundKeeperAll.exe total RAM usage stays the same).
Veg , the fix working like a charm
i want to suggest an additional option veg if u can work around it
my scenario is : i have 2 display screens and the bar is the 3rd , can u implement an option allowing us to turn off the 2 main screens after a specific time of mouse and keyboard idle / or even using a hotkey to overcome the original windows display turn off option which turn off the 2 screens plus the sound bar too
something like this option in the MultiMonitorTool.exe disable monitor / turn off
if this implemented in the tool , it will be a total solution for the sound bar users
so i never replied because my problem was very intermittent and i couldn't seem to nail down reproducing it, much less catching it on a log.. but it seems you have inadvertently fixed my issue with this latest update, everything seems to be working perfectly now, thanks for all your work!
I guess that your PowerShell script plays on one primary output only (like in the default Sound Keeper mode), and Sound Keeper with All flag enabled plays on all audio outputs. The more outputs are active, the more memory it needs for audio buffers. Sound Keeper creates a 1-second buffer for every audio output. WASAPI uses float32 sample format in shared mode, so each sample always takes 4 bytes. For stereo output with 48000 Hz sample rate, the buffer is 48000*2*4 = 384000 bytes. For 7.1 output with 192000 Hz sample rate, the buffer is 192000*8*4 = 6144000 bytes. So, it depends on amount of used audio outputs and their resolution. I could make audio buffer smaller, e.g. 100ms, it will reduce memory consumption 10 times, but the sound keeper threads will wake up 10 times more frequently to feed the next piece of data to WASAPI. So it will consume a bit more CPU. There is always a tradeoff between CPU and RAM. I think that 1-second buffer is reasonable. Maybe I will make it configurable in the future.
Glad to hear that. Thanks that your helped to find the bug!
It doesn't sound like a direct responsibility of Sound Keeper for me. But I'll keep in mind this suggestion for the future.
All the thanks go to Sameh that helped to debug this issue recently =)
u welcome , thank u for ur great efforts on developing this tool
for my suggestion , i think that the main goal of the soundkeeper is to keep the digital device away from sleeping
and it should overcome the windows display screen turning off of the soundbar / digital device which prevent the soundkeeper app from its goal
while the audio device turning off after the idle time its gone to the sleep mode cause its not rec any stream from the app , which we can overcome by my suggestion to keep the device always on
yea we can easily disable the display turning off option . but it will be great addition option if u did it
thanks again for ur help
but this tool turns off all the displays and the soundbar too
if this may help
I added this idea to my backlog, but don't expect it to be implemented soon. There are dozens of ideas of improvements just for this project alone, and I also have a lot of other projects that are waiting for their time, some of them are even unreleased yet. Most of the ideas from the backlog stay untouched or are in unfinished state for years, unfortunately 😞
Sound Keeper was planned as a simple tool without settings at all. It was working fine for me without any changes for years, but as it turned out, other audio hardware of other people required a bit other stream types to make this workaround working, so some settings started to appear, and now there are so many of them that I still didn't update this page to properly document all of them 😊
The next feature from the backlog that I'd like to implement is specifying different settings for different audio outputs since it's not like one size fits all situation. Also it would be nice to introduce some lightweight GUI for it, so you could easily try different settings to quickly find out what works best for you. I don't want to choose the simplest route and want to avoid using heavy GUI frameworks, but it requires much more time for implementation. At least, people won't be upset that a tiny 20KB utility turned into a 100MB monstrosity (.NET MAUI, I'm looking at you), and I enjoy writing tiny programs much more, even though it takes much more time =) Also, I want to turn Sound Keeper into a service so it starts to work even before you log in into system and even the first login sound won't be cut.
After this, I consider adding Smart Sleep feature that would replace or complement standard Windows Sleep capabilities. Your suggestion perfectly fits the Smart Sleep feature, it can be one of its modes. But it's an idea for rather far future. There are no specific plans when it will be implemented.
Meanwhile, maybe you could just consider connecting your soundbar directly to your PC so you won't depend on monitor state? 😉
P.S. While writing this comment, figured out that emoji wasn't supported by the DB of this blog. Fixed this 🙃
Running the app as a service is a good hint to catch the early sounds
my soundbar ( Samsung Q700A ) connected directly to the pc through hdmi cable
thats why the windows defines it as a display screen
Does the killing of the program when muting it have to be mandatory? To limit Sound Keeper to my soundbar I'm thinking about using a program (EarTrumpet) to mute Sound Keeper when the soundbar isn't the default program. But it obviously fails a bit...
Thomas, well, I just thought that this feature could be useful for somebody who wants to exit Sound Keeper using some GUI, and there is no option to disable this behavior. I'll think what to do with it. Maybe I'll just remove this feature if nobody actually uses it.
I agree it could have a use but if it could be made optional it'd really help out in my case
Thomas, I made a beta build that has this feature disabled. I didn't decide what to do with your use case in the next release yet, but at least you can use the beta for now =)
You are awesome, you know that? Thanks!
You're a lifesaver!
I've been struggling with my bluetooth speaker and my laptop.
While using Windows 10, everything's fine. The bluetooth speaker still connected when my laptop is on the idle mode.
But when I upgraded to Windows 11, the bluetooth speaker automatically disconnected when my laptop is on the idle mode.
And for reconnect, I must turn off the bluetooth speaker and then turn on again.
I cannot reconnect just using my laptop, I don't know why.
It was frustrating, I tried different Driver etc etc, still cannot fix the problem.
And then I discover your software, I just put Sound Keeper on my startup and then everything works fine!
Thank you so much!
i found that when i use sound keeper
the atmos setting in sound setting(the one you can chose how many speaker do you have) will be reduce from 7.1 to 2.1. and i cant change it anymore.
sorry for the last rude message
i found that only happened when i choose 2.1 PCM for first and i wanna change back to atmos,
that will happened。
appreciate the apps,
MY lg c2 finally wont black out
after tons and tons google
you are truly my saver。
kinson, so your issue is resolved now?
As far as i dont change from atmos to 7.1 or 5.1 or 2.1
Everything working fine
If i change i need to reboot pc again
But sofar is working fine👍👍