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.
Download: soundkeeper.7z (90KB). Source code →
The archive contains a few builds (you can remove unused ones):
- SoundKeeper64.exe is for x86-64 versions of Windows, most people need this version.
- SoundKeeper32.exe is for x86-32 versions of Windows, if you have a very old PC with 32-bit Windows.
- SoundKeeperARM64.exe is a native ARM64 build, if you have a new ARM based PC.
There is also a debug version that outputs all debug logs into a console window. Please provide the logs when you report issues.
Features
- Sound Keeper is fully automatic and doesn't require any user interaction.
- Supports keeping on multiple sound outputs (e.g. an SPDIF and an HDMI).
- Detects new sound outputs on the fly (e.g. when you connected a TV via HDMI).
- Supports various stream types that should help in all possible cases.
Settings
Default behavior can be changed by changing file name of the Sound Keeper executable (just add desired settings to the Sound Keeper file name) or by passing them as command line arguments. All settings are case insensitive.
Primary audio output is used by default. If current primary audio output has changed, the Sound Keeper detects this and switches to the new output automatically. If you want to run Sound Keeper on all enabled audio outputs, just add All to executable file name to enable Sound Keeper on all outputs.
All supported audio output type modes:
- Primary keeps on primary audio output only. It is used by default.
- All keeps on all enabled audio outputs.
- Digital keeps on all enabled SPDIF and HDMI audio outputs (like it was in Sound Keeper v1.0).
- Analog keeps on all enabled audio outputs except SPDIF and HDMI.
Inaudible stream of zeroes with infrequent smallest possible non-zero samples (fluctuations) is used by default. Add Zero to executable file name to use stream of zeroes only.
All supported stream types:
- OpenOnly opens audio output, but doesn't stream anything. Sometimes it helps if it's a driver only issue.
- Zero plays stream of zeroes. It may be not enough for some hardware.
- Fluctuate plays stream of zeroes with the smallest non-zero samples once in a second. Used by default.
- Sine plays 1Hz sine wave at 1% volume. The frequency and amplitude can be changed. Useful for analog outputs.
- White, Brown, or Pink play named noise, with the same parameters as the sine (except frequency).
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.
Stream parameters:
- F is frequency. Default: 1Hz for Sine and 50Hz for Fluctuate. Applicable for: Fluctuate, Sine.
- A is amplitude (i.e. volume). Default: 1%. If you want to use inaudible noise, set it to 0.1%. Applicable for: Sine, Noise.
- L is length of sound (in seconds). Default: infinite.
- W is waiting time between sounds if L is set. Use to enable periodic sound.
- T is transition or fading time. Default: 0.1 second. Applicable for: Sine, Noise.
Examples:
- SoundKeeperAll.exe generates default inaudible stream on all enabled audio outputs.
- SoundKeeperZero.exe generates zero stream on primary audio output.
- SoundKeeperAllZero.exe generates zero amplitude stream on all enabled audio outputs.
- SoundKeeperSineF10A5.exe generates 10Hz sine wave with 5% amplitude on primary audio output. It is inaudible.
- SoundKeeperSineF1000A100.exe generates 1000Hz sine wave with 100% amplitude. It is audible! Use it for testing.
- SoundKeeper.exe sine -f 1000 -a 100 is command line version of the previous example.
- SoundKeeper.exe brown -a 0.1 generates brown noise with 0.1% amplitude.
What's new in v1.3.4
- Tune the Windows 8-10 WASAPI memory leak workaround to make it working for longer time.
- Native ARM64 build (with statically linked runtime hence the bigger binary).
- [2024/11/12] Added digital signature.
What's new in v1.3.3
- Fixed arguments parsing bug: All or Analog after specifying stream type led to amplitude set to 0.
What's new in v1.3.2
- Fluctuate treats 32-bit PCM output format as 24-bit since WASAPI reports 24-bit as 32-bit for some reason.
- Fluctuate generates 50 fluctuations per second by default. It helps in many more cases.
- Sound Keeper doesn't exit when it is muted.
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.3 | SPDIF Keep Alive v1.2 | SPDIF-KA v1.4 | |
Fully automatic: | Yes | No | No |
Multiple outputs: | Yes | No | No |
Stream types: | 7 | 2 | 2 |
Periodicity: | Yes | No | No |
GUI: | No | Yes | Yes |
Requires .NET: | No | Yes | Yes |
Executable size: | 20KB | 668KB | 163KB |
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 doesn't go into sleep mode automatically after specified time of inactivity. 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 →
Kinson, maybe you could try debug build, it should show something in the logs when you switch from 7.1 to 2.1 and back.
hi there, me again! ha.. got a new TV and along with it came new problems. I'm not entirely sure it's soundkeeper's problem though. I got an LG B2 so i can do 4k120, and everything works just fine for the most part. Using Atmos, when switching things to do with the video (switching to TV only, turning on/off HDR, etc) I lose audio. I can kill/restart soundkeeper and it comes back. But often when starting a game it will either enable HDR or switch resolutions, then i'm stuck with no audio in the game. switching out to kill/restart tends to cause havoc and loss of video signal.
I tried the debug version and it doesn't seem to cause any events when I make a change and the audio drops, so i'm not sure how helpful that would be.
I have tried different cables and different configurations between PC/AVR/TV and all exhibit the same issue. Reading up online there seems to be an Atmos/4k120 issue with the Geforce drivers from about a year ago and they claimed a fix was coming but here we are a year later and I'm still having the issue. Any thoughts or advice?
sneakytiki, sounds like buggy drivers that can't properly handle switching modes when there is an active audio stream. Sound Keeper itself shouldn't cause losing audio, it just plays silence and nothing else.
yeah i figured, soundkeeper is the only thing that fixes it (most of the time) with a kill/restart.. i'll dig through the geforce forums and see if i can find anything, thanks for a quick reply!
hey just to see if you see anything odd, here's a debug log after switching to TV only, having no sound, killing soundkeeper, then running the debug version.. that "unrecognized sample format" caught my attention.. sound works after running this
sneakytiki,
"Unrecognized sample format" is expected for all non-PCM output formats. Sound Keeper uses output format to choose the minimum possible amplitude of a fluctuation when Fluctuate stream is used, and all non-PCM formats are treated as at least 24-bit.
The log doesn't show any events after it started rendering. This is the problem. OS should notify the Sound Keeper that current stream is interrupted and needs to be restarted, but there is nothing about it. So most probably the driver just forgets to send related notifications. I don't log all possible WASAPI events (like "name of an output has changed") because it might be noisy, but I could add detailed tracing mode to log even such seemingly unrelated events just in case in the future.
I have an idea that might help though. WASAPI reports how many samples it consumed when Sound Keeper feeds it with fresh samples. When current stream in such "zombie" state, it might always report that it consumed 0 samples. If it is the case, I could use it as a trigger to restart the stream if it consumed 0 samples for longer than 1 second. But it is also possible that the system pretends that it consumes all the samples as expected. In this case this workaround won't help. We'll need to experiment a bit with this to figure out if it helps.
I'll make an experimental version later when I have more free time.
sneakytiki, I updated debug build. Please check if it helps.
so for this test i started with Dual monitors, Atmos on, start Sound Keeper, sound works. Then I switched to TV only, and the sound no longer works. the "new state" is when I switched to TV only.
So the system consumes all the samples as expected and the potential workaround didn't help. The latest event means that a device changed its state to "unplugged", but it's not the primary device that is used by Sound Keeper in this case, so Sound Keeper ignores it. You can check current status of all audio outputs in the Sound Control Panel, you should be able to see current primary (or default) playback device, unplugged devices, etc. All the changes there are reported by WASAPI to all audio applications including Sound Keeper.
I didn't add any new debug output into this build because I'm very skeptical that could show anything new. Maybe later.
BTW, if you want to restart Sound Keeper, you can just launch the exe file again. It stops previous instance automatically.
looked at the windows sound settings, TV is the default device, but there was another instance of the TV so i thought maybe it was disconnecting and switching to that one? tried disabling that, but no difference.. here's another log where i opened Sound Keeper, sound was working, opened a game, sound not working.. alt-tab'd out, in "advanced setup" click configure on the device, cancel, sound comes back at the 18:22 mark..
I don't see how I could help here. Maybe it will work normally if you just choose standard PCM output format instead of Dolby Atmos?
oh no problem, just thought there might be something to see in there that would be useful that you could decipher that i can't.. it works fine if i set it to 5.1 but Atmos sounds better and I would like to use it.. in fact, in 5.1 i don't get the silent stream bug like in Atmos which is why I use Sound Keeper to begin with.
It's probably an Nvidia driver problem so i'll see if i can get anyone on the geforce forums to respond at all, not having any luck so far.. thanks for your help though, your program has been essential thus far
sneakytiki, could you please check that running another instance of Sound Keeper correctly stops the previous instance at least and you don't need to kill it explicitly. If it helps, you could just put a Sound Keeper shortcut somewhere and run it whenever you encounter this issue.
yes, simply re-running sound keeper seems to fix the problem.. and i do have kill soundkeeper and run soundkeeper shortcuts, but it's nice to know i don't need to bother with the kill one.. hopefully i can get everything to play ball and if i have to alt tab out of a game every once in a while i'll be fine
the other issue i was having was alt tabbing was causing an unknown video signal and i'd end up with no display on either monitor, but that's a whole different issue that i feel is related to Nvidia drivers.. sometimes i could revert to my monitor using Ultramon, sometimes it wouldn't respond.. switching hardware tends to throw everything out of whack for a while, it all seems to be getting better.. thanks again for your help
Hello Veg,
I would like to know if this software helps Bluetooth speaker from auto turn off. I can’t find a solution this to problem.
Thank you in advance.
Alan, the only way to know is to try. If your speaker turns off when nothing is playing and doesn't turn off when something is playing, Sound Keeper should help, but default settings might not be sufficient. There are a lot of settings to play with, e.g. you can try SineF5A10 (a low frequency sine signal) or something else, look for details in the readme file.
Hi, does this process run/work when Windows is in "locked mode"?
I'm using this to prevent my HDMI soundbar from going into standby (unfortunately it frequently goes into standby), and it doesn't wake automatically. So I need to try to keep it on or else I'd have to press the on button manually to turn it back on from standby (just a stupid speaker..).
Anyway, I noticed that this does not work if I let my windows screen timeout to lock mode, my soundbar still shuts off.
Xun,
Yes, it does.
Most probably it's because you connect your soundbar using HDMI that is disabled on screen timeout. In this case, you should either keep your screen always on (disable auto turn off) or connect the soundbar using some other non-display audio output type (e.g. S/PDIF if possible).
I found for my Vizio Atmos soundbar that the SoundKeeperSineF10A5.exe works best for the Dolby Access ATMOS audio going out to the Vizio ATMOS soundbar. It cuts delay for audio from about 6-10 seconds to about 1 second. It really works great.
molitar, did you try lower values, e.g. F5A1? Or F10A5 is the lowest that helps?
Hello. I have an LG C2 paired with a Sonos ARC, and although using your program has completely eliminated the very loud screeching that'd sometimes happen at random, it's only managed to improve the problem of audio popping/distortion, but not entirely eliminate it. Primarily, my main problem now is that after about 25-30 minutes of watching/playing something on my PC, the audio will get heavily distorted, almost like wind whipping through a partially open car window while you're driving on the highway, but then it usually manages to correct itself after about a minute or so and then the audio is fine again. That is until I turn the TV off and then back on again later, in which case the audio distortion will reappear after 25-30 minutes, and then resolve itself after a minute of heavy audio distortion. For the record, before I started using your program, this audio distortion wouldn't go away until I actually turned off Dolby Atmos itself and then re-enabled it. I've tried multiple settings, including SineF10A5, but unfortunately nothing eliminates this recurring distortion. Do you have any suggestions of what I could try next? Any help at all would be greatly appreciated.
Tunic,
Unfortunately, it doesn't sound like an issue that the Sound Keeper could resolve. It's either hardware or driver issue. If it goes away when you don't use Dolby Atmos, just don't use it ;)
Ah, I see. Thanks for your response. I happened to find your software through this particular post on reddit (https://www.reddit.com/r/pcgaming/comments/10xctmg/psa_if_you_have_issues_with_dolby_atmos_randomly/), and I guess I was hoping that by fiddling with the settings enough provided by your program, that it'd solve the issues I was having with Dolby Atmos completely, but I think it just comes down to the fact that Dolby Atmos itself is just really buggy and has inherent problems as far as random audio glitches are concerned. That being said, I just wanted to mention again that your program significantly improved the problem and works perfectly for me by keeping my soundbar from sleeping, since before that the audio glitching was much more frequent. It's still pretty random when the audio glitching occurs, since despite what I said in my first post, sometimes hours will go by until the audio starts glitching out, and in the worst case, it requires me to close whatever it is I'm doing and open it again, but after that the audio stays completely fine. Personally, despite its problems, I prefer Dolby Atmos over standard sound, so I guess I'll just have to accept the issues it's got until hopefully these bugs get ironed out at a later date.
In case it might manage to help anyone else out, I just wanted to quickly mention that I resolved my audio problems by enabling the "passthrough" setting in my television's settings. Haven't had a issue for weeks now. That being said, thanks again for the program! It works great!
Tunic, do you still need the Sound Keeper then? What TV do you use? What OS does it have? Where is this setting placed exactly?
Hi Veg, I used your software and I'm still getting audio cut off every with certain games. Any idea what settings I should use on your software to fix this? I've got an LG C1 connected to my pc and Vizio M512a H6 soundbar. I'm using Hdmi eArc with passthrough. Would greatly appreciate it if this can be fixed.
KoTor, try the debug version and enable an audible signal (e.g. SineF1000A5) to see and hear what happens during these problematic moments, and share the results here.
The cutting off only really happens when I have dolby atmos home theater enabled on my pc and when i play certain games. I dont usually have issue on anything else but when playing games on dolby atmos. LPCM doesnt usually give me this issue either just atmos. Id love to use atmos on enabled games but this cutting out can get frustrating lol.
Heres the result after Running the sine signal for about half an hour.
Looks like nothing can be done from the Sound Keeper side here.
I have a bluetooth headset which soft-disconnects from windows (bluetooth settings still shows "Connected" but not showing "Connected voice, music" anymore, and no sound is played through the headset until a power-recycle) after 6 SECONDS! Unbelivable. You finish watching a youtube video, and really dont have time to start another one.
Soundkeeper helps fixing that, even with the OpenOnly setting, but All does not work, i have to use Primary.
Thanks for the tool. I love the the-filename-is-also-arguments idea.
moli,
That's weird. If it works with Primary, it should work with All too. Could you please try the debug version and share what it outputs in both cases?
Related to the stopping audio on monitor standby when it is connected using HDMI:
https://www.reddit.com/r/htpc/comments/jcqm7l/comment/g93ptjo/
Hey VEG, i just read your follow-up on my case, you asked for logs, so i opened a github issue at https://github.com/vrubleg/soundkeeper/issues/6 . I am just writing this, as in one of your older issue, you said, you are not closely following gibhub. Thanks.
Sound Keeper v1.3.2
Thanks Peter Riedlberger for the assistance in testing of compatibility improvements of this version with Sound Blaster Z.
Sound Keeper v1.3.3
Just wanted to say thank you for this. It's solved my issues on my windows 11 pc with a tv and soundbar.
Creative X4 sound card, powercfg /requests gives [DRIVER] Legacy Kernel Caller
Unable to switch it off. Only way to go to sleep is to kill the soundkeeper manually \ win 11
any workarounds?
Nikita, you can try second method from this page, but it will disallow all applications to prevent automatic sleep.
Curious if you know what could be causing this, when using Soundkeeper and Dolby Atmos with my 11.2 setup Anthem receiver and PC, I get a background "hissing" sound when listening at high volume. its very low, but enough to be noticeable. Its not the receiver as switching to DTS:X causes it to go away or if I go into the volume mixer and mute Soundkeeper, the hiss goes away. Any idea what why this would be happening?
Do you use the latest version of the Sound Keeper? What signal type do you use? Did you try Zero?
Maybe it's just standard hissing that happens whenever an amplifier with powerful speakers are active? You may not hear it in other cases because any other sound is masking it or receiver switches into sleep mode and disables the amplifier.
Youve saved a old man with a bad back from a regular annoyance (I can handle turning them on each morning). I used SineF5A10 to stop my JAM Bookshelf Speakers from turning off each time Youtube went on pause and I didnt notice. Very nicely created software and instructions too!
@VEG thank you! The Zero method fixed the issue!
CF, just check that the receiver actually doesn't go into sleep mode with Zero. Some do.
Hi there,
My problem is, everytime I exit a program that has an exclusive audio output (say Foobar2000 or VLC for instance), Soundkeeper shuts off and I need to restart it manually.
Could there be a workaround?
Thanx !
Gaël, old v1.0 behaved like this. Did you try the latest v1.3? If it happens even on the latest version, try the debug version to see what exactly happens, and share its output here in the comments. If it closes itself and you can't see the output, just run it through cmd.
@VEG
I was using the lastest version, but still having problems.
Using the debug version seems to work, though, which is strange. Closing VLC in exclusive mode puts Soundkeeper instantly back on a loop, which v1.3.3 did not do. What could cause this?
Well, the debug version is actually also v1.3.3. It's just built with debug output enabled.
Are you 100% sure that the release executable that you use is v1.3.3? Could you please check it in file properties? Maybe an older version was running in background when you tried to run the new version?
Yes, it's the 1.33 version of the soundkeeper64.exe.
1. When exactly the Sound Keeper process disappears from the process list: when you enter exclusive mode, and when you leave it?
2. Maybe there are some related crash reports in the Event Viewer or crash dumps in the %LOCALAPPDATA%\CrashDumps? If Windows doesn't create crash dumps for crashed programs on your system, you might need to go into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps in the registry, and create a new DWORD value named DumpType with value 1.
3. Can you collect a Process Monitor log while the issue is reproduced so I could try to see there what is happening? You can download the Process Monitor from Microsoft. Close all other programs (literally everything you can close), then run the Process Monitor, and press "Capture". The program will start to monitor and record all events in your system. This is why it is important to close as many programs as you can: otherwise it will be too much of noise. Then quickly run Sound Keeper, and then reproduce the issue. When the issue is reproduced (the Sound Keeper process disappeared), stop capturing in the Process Monitor. Then click save and choose to save all events, and then share this log file with me. It might be huge, please archive it and use something like Google Drive for sharing.
I bookmarked this website several years ago after installing the app on my previous desktop PC. So glad I didn't delete the bookmark. Just got a new laptop, and noticed the repeated clicking and cutoff of audio after every YouTube video or song on Spotify. Super annoying. I was combing through my bookmarks recently to see what I should delete and stumbled on this. Installed and cured the issue! Thanks so much so keeping this app up to date. Really makes a difference.