lx-s / WinMute

WinMute lets you automatically mute your PC volume on certain events (e. g. Screensaver, Workstation Lock, Shutdown, etc.).
BSD 3-Clause "New" or "Revised" License
168 stars 6 forks source link

Not Unmuting after Unlock on Discrete GPU #31

Open jbienz opened 10 months ago

jbienz commented 10 months ago

I have WinMute set to mute on system lock and restore when unlocked:

image

But when I unlock the next day, the audio is still muted.

I have enabled logging and I believe the problem is that WinMute seems to lose track of the NVidia discrete GPU audio device. WinMute sees NVIDIA High Definition Audio on system lock, but for some reason doesn't see it on system unlock:

[2023-11-04 17:11:57] Mute Event: Workstation Lock start
[2023-11-04 17:11:57] Saving mute status
[2023-11-04 17:11:57] Found audio endpoint "U28E590 (HD Audio Driver for Display Audio)"
[2023-11-04 17:11:57] Found audio endpoint "Speakers (Realtek(R) Audio)"
[2023-11-04 17:11:57] Found audio endpoint "Headphones (Jabra SPEAK 510 Bluetooth)"
[2023-11-04 17:11:57] Found audio endpoint "Headphones (Oculus Virtual Audio Device)"
[2023-11-04 17:11:57] Found audio endpoint "U32J59x (NVIDIA High Definition Audio)"
[2023-11-04 17:11:57] Found audio endpoint "U28E590 -2 (5- HD Audio Driver for Display Audio)"
[2023-11-04 17:11:57] Muting workstation
[2023-11-04 17:12:29] Mute Event: Display Standby start
[2023-11-04 17:12:29] Muting event already active. Skipping status save
[2023-11-04 17:17:06] Mute Event: Display Standby stop
[2023-11-04 17:17:47] Mute Event: Display Standby start
[2023-11-04 17:17:47] Muting event already active. Skipping status save
[2023-11-04 22:30:00] Muting event already active. Skipping status save
[2023-11-04 22:30:00] Mute Event: Quiet Hours startet
[2023-11-04 22:30:00] Found audio endpoint "Speakers (Realtek(R) Audio)"
[2023-11-04 22:30:00] Found audio endpoint "Headphones (Jabra SPEAK 510 Bluetooth)"
[2023-11-04 22:30:00] Found audio endpoint "Headphones (Oculus Virtual Audio Device)"
[2023-11-05 09:30:00] Mute Event: Quiet Hours ended
[2023-11-05 09:30:00] Skipping restore since other mute event is currently active
[2023-11-05 09:30:00] Manual muting: off
[2023-11-05 14:00:37] Mute Event: Display Standby stop
[2023-11-05 14:00:47] Mute Event: Workstation Lock stop
[2023-11-05 14:00:47] Restoring previous mute state
[2023-11-05 14:00:48] Restoring: Mute true for "Speakers (Realtek(R) Audio)"
[2023-11-05 14:00:48] Restoring: Mute true for "Headphones (Jabra SPEAK 510 Bluetooth)"
[2023-11-05 14:00:48] Restoring: Mute true for "Headphones (Oculus Virtual Audio Device)"

Could you please investigate if this is a bug? I suppose it may be possible that the discrete GPU audio device isn't initialized until after sign-in. I could potentially disable power savings for that device, but it would be really wonderful if WinMute could monitor for audio devices being added even after unlock and restore them to their previous state. This could be done, for example, using:

https://learn.microsoft.com/en-us/windows/win32/coreaudio/device-events

lx-s commented 10 months ago

Hi there!

this sounds like it might be related to https://github.com/lx-s/WinMute/issues/30 (link to the post: https://github.com/lx-s/WinMute/issues/30#issuecomment-1790286734). In the last posts of this issue you’ll find a beta version that should work. Would you like to try and test it?

jbienz commented 10 months ago

Sorry it took me so long to get back to this. Yes, it appears the beta update is helping. I did have one time that I thought it didn't work, but for some reason WinMute wasn't running. I think that was a fluke with my machine.

I'll report back if I have any future issues, but for now I think this is resolved. THANK YOU!

jbienz commented 10 months ago

P.S. WinMute helps my son sleep at night in a room that's right across from my office. It stops discord and other notifications from waking him up. I PayPal'd you a donation, so please enjoy a coffee on us and thanks!

lx-s commented 10 months ago

I think that was a fluke with my machine.

You can go to the WinMute settings and check if "run on startup" is still set. Maybe it got disabled. Great that it's working now!

P.S. WinMute helps my son sleep at night in a room that's right across from my office. It stops discord and other notifications from waking him up. I PayPal'd you a donation, so please enjoy a coffee on us and thanks!

Thank you very much :)

Eelstone commented 10 months ago

P.S. WinMute helps my son sleep at night in a room that's right across from my office. It stops discord and other notifications from waking him up. I PayPal'd you a donation, so please enjoy a coffee on us and thanks!

Sorry for a potentially stupid question, but I also wanted to donate after excellent support (on excellent software). How do you find account number or paypal to Alexander. I have looked for it, but could not find.

lx-s commented 10 months ago

Oh - wow! That's extremly nice of you both. Thank you! 😀

The link is found here: https://github.com/lx-s/WinMute on the right side grafik

Thanks again 😊

jbienz commented 9 months ago

Hey @lx-s, I hate to ask for this to be reopened but it seems to still be erratic for me. At first I thought it was because it wasn't launching on startup, but I did get that fixed.

Here's the log file:

WinMute.log

The important audio device in question is

U32J59x (NVIDIA High Definition Audio)

You'll notice in the block for todays session it doesn't do any Restore, even though devices are found:

[2023-11-20 09:58:45] Starting new session...
[2023-11-20 09:58:45] Found audio endpoint "U28E590 (4- HD Audio Driver for Display Audio)"
[2023-11-20 09:58:45] Found audio endpoint "U28E590 -2 (2- HD Audio Driver for Display Audio)"
[2023-11-20 09:58:45] Found audio endpoint "U32J59x (NVIDIA High Definition Audio)"
[2023-11-20 09:58:45] Found audio endpoint "Speakers (Realtek(R) Audio)"
[2023-11-20 09:58:45] Found audio endpoint "Headphones (Jabra SPEAK 510 Bluetooth)"
[2023-11-20 09:58:45] Found audio endpoint "Headphones (Oculus Virtual Audio Device)"
[2023-11-20 09:58:46] Starting WinMute 2.4.1.0
[2023-11-20 09:58:46] Loading settings:
[2023-11-20 09:58:46]   Restore volume: Yes
[2023-11-20 09:58:46]   Mute delay: 0
[2023-11-20 09:58:46]   Mute on lock: Yes
[2023-11-20 09:58:46]   Mute on display standby: No
[2023-11-20 09:58:46]   Mute on logout: No
[2023-11-20 09:58:46]   Mute on suspend: No
[2023-11-20 09:58:46]   Mute on shutdown: No
[2023-11-20 09:58:46]   Show notifications: Yes
[2023-11-20 09:58:46]   Mute on bluetooth: No
[2023-11-20 09:58:46]       Use devicelist: No
[2023-11-20 09:58:46]   Mute on WLAN: No
[2023-11-20 09:58:46]       Use allowlist: No
[2023-11-20 09:58:46]   Mute specific endpoints only: No
[2023-11-20 09:58:46] WinMute initialized

I'm still running the beta build, BTW.

lx-s commented 9 months ago

Ah, shot. I'll look at it

lx-s commented 7 months ago

Sorry for coming so late to this bug again...

To reiterate your scenario:

  1. You leave your PC running the whole time
  2. In the evening, when your display goes to standby, WinMute mutes your PC. Your PC does not enter standby or hibernation or anything?
  3. In the morning, when you start using your pc again, WinMute does not unlock your U32J59x (NVIDIA High Definition Audio) ?

Thank your for your help and patience