Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Suggestion: Kill SoundKeeper on Workstation Lock, Start it again on Workstation Unlock #12

Open
mackid1993 opened this issue Mar 7, 2024 · 20 comments

Comments

@mackid1993
Copy link

I have a feature suggestion to perhaps help with sleep issues.
Perhaps an option can be added for SoundKeeper to create two scheduled tasks in Task Scheduler. One to kill the process on workstation lock, to help with automatic sleep issues and another to start SoundKeeper back up on Workstation Unlock.

I've done this manually with two batch files and it works quite well. At least with Windows 11 the screen will automatically shut off if audio is playing allowing the workstation to lock and SoundKeeper to be killed. Once the workstation is unlocked SoundKeeper will start up again. At least on Windows 11 this should help with sleep issues.

@vrubleg
Copy link
Owner

vrubleg commented Mar 8, 2024

It was one of the things that I considered, but it's not flawless. For example, when my workstation is locked, I expect to hear notifications from IM apps, and without Sound Keeper these short sounds will be cut.

I may add it as an option in the future.

@mackid1993
Copy link
Author

It's a good option for a laptop perhaps. That's my use case.

@vrubleg
Copy link
Owner

vrubleg commented Mar 8, 2024

If your system is configured to go into sleep mode when laptop lid is closed, streaming any audio shouldn't prevent your system from sleeping.

@Sipu
Copy link

Sipu commented Jun 9, 2024

@mackid1993 you should be able to accomplish this by creating a task in task scheduler that triggers "on workstation lock of any user" that kills the process using taskkill for instance, and vice versa, restarts it on logon / unlock. It doesn't necessarily need a software feature at all. You can implement all kinds of complex event based scenarios using task scheduler pretty easily.

@vrubleg
Copy link
Owner

vrubleg commented Jun 9, 2024

There is the soundkeeper kill command to shut it down gracefully.

@Sipu
Copy link

Sipu commented Jun 9, 2024

@vrubleg cool, yeah i see it's buried in the changelog but it's not documented in the read me. Please fix the docs and it would be super helpful to have a /? help usage switch. The current docs say The program doesn't have GUI. It starts to do its job right after the process is started. To close the program, just kill the soundkeeper.exe process. :)

@Sipu
Copy link

Sipu commented Jun 9, 2024

Also, thanks for making this tool. I just bought the Q Acoustics M20 HD's for my PC and the USB seems to be a glorified s/pdif and when the signal goes dead, the speaker kills the amp and it comes alive with an annoying pop every time audio playback starts. Glorious sound, but unusable without your tool :)

@mackid1993
Copy link
Author

you should be able to accomplish this by creating a task in task scheduler that triggers "on workstation lock of any user" that kills the process using taskkill for instance, and vice versa, restarts it on logon / unlock. It doesn't necessarily need a software feature at all. You can implement all kinds of complex event based scenarios using task scheduler pretty easily.

I actually did this but I had to stop using SoundKeeper as keeping the audio hardware active all of the time was shaving 2 hours off the battery life of my laptop 🙁It's a shame because it stopped the audio popping issues when the hardware woke up.

@vrubleg
Copy link
Owner

vrubleg commented Jun 11, 2024

OMG, is it your DAC so power hungry? What model do you have?

@mackid1993
Copy link
Author

mackid1993 commented Jun 11, 2024 via email

@vrubleg
Copy link
Owner

vrubleg commented Jun 12, 2024

Oh, that's weird. Laptops usually have class D amplifiers that are very energy efficient. 2 hours off sounds like too much. How did you measure?

@mackid1993
Copy link
Author

mackid1993 commented Jun 12, 2024 via email

@vrubleg
Copy link
Owner

vrubleg commented Jun 12, 2024

Did you try the OpenOnly mode? That just opens the audio device but doesn't stream anything.

@mackid1993
Copy link
Author

Did you try the OpenOnly mode? That just opens the audio device but doesn't stream anything.

That helps the battery issue, but not the audio popping. I'm going to try running it stock and benchmark it a little bit better because it really does solve all of my audio problems.

@mackid1993
Copy link
Author

It seems like OpenOnly is the way to go. Drain is much less, the popping actually happens but it's more of a pop and less of a crackle so it's worth the tradeoff!
Thanks for your help VEG!

@vrubleg
Copy link
Owner

vrubleg commented Jun 12, 2024

I wanted to clarify further what actually you are using?

  • Built-in speakers?
  • Wired headphones?
  • Bluetooth headphones?

@mackid1993
Copy link
Author

I wanted to clarify further what actually you are using?

  • Built-in speakers?
  • Wired headphones?
  • Bluetooth headphones?

Sorry I'm using the built in speakers on my Surface Laptop Studio 2.

@vrubleg
Copy link
Owner

vrubleg commented Jun 12, 2024

This is really wild that built-in speakers have this issue.

@mackid1993
Copy link
Author

Yup leave it to Microsoft!

@mackid1993
Copy link
Author

@vrubleg So I tested a little more. SoundKeeperZero.exe seems to stop the popping and also lets the battery drain drop a little bit lower at idle.

Hopefully Microsoft will eventually fix this with a driver or firmware but my hopes aren't high.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants