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

Umuting external monitor #30

Closed
Eelstone opened this issue Oct 30, 2023 · 8 comments
Closed

Umuting external monitor #30

Eelstone opened this issue Oct 30, 2023 · 8 comments
Assignees
Labels
Milestone

Comments

@Eelstone
Copy link

I am using your excellent code with great pleasure, however in my setup I am using the built-in speakers in my external Samsung CF791 monitor connected to the computer via a DVI/USB-C cable. The monitor speakers are indeed muted via WinMute when locking the computer, however the unmute part for the monitor does not work. I guess this should be a small bug to correct?

@lx-s
Copy link
Owner

lx-s commented Oct 31, 2023

Thank you for your compliments :)

That muting works but unmuting doesn’t is strange, since WinMute uses the windows api which abstracts the actual hardware away.

can you:

  1. enable logging within winmutes settings
  2. Restart WinMute
  3. lock your pc
  4. unlock it
  5. attach the log file here

Thanks for your help!

@lx-s lx-s self-assigned this Oct 31, 2023
@Eelstone
Copy link
Author

Hi and thanks for your respons,

I managed to catch this via the log file but noticed some unexpected behavior. If I lock the computer and more or less immediately unlock it, WinMute will unmute the monitor (and the built-in sound card) which also is reflected in the log file. However, if I lock the computer and wait some time (in this case approx 10 minutes), when unlocking only the sound card get unmuted and not the monitor. This is also reflected in the log file attached. I should maybe also mention that WinMute runs on a corporate computer where my user is not administrator and with policies restricting some settings but I cant really see that this fact should affect WinMute.

Thanks and regards! :)

WinMute.log

@lx-s
Copy link
Owner

lx-s commented Nov 1, 2023

What seems to be happening here, is that your monitor goes into standby and windows deregisters its audio endpoint.

WinMute gets this notification and re-reads all audio endpoints that are registered within the system:
[2023-10-31 19:52:49] Found audio endpoint "Speakers (Realtek High Definition Audio(SST))"

Apparently the monitor takes a while to get registered again within windows.
I'll see what I can do about this, but this seems to be a tricky one (hardware timing problems always are :( )

@lx-s lx-s added the bug label Nov 1, 2023
@lx-s lx-s added this to the Future milestone Nov 1, 2023
@lx-s
Copy link
Owner

lx-s commented Nov 1, 2023

Here is an early beta version where i started to implement the i18n stuff: winmute_beta.zip
I added a few more log points. If you want you can try this one out and paste me the log file. Maybe I can refine the "reinitialize endpoints" code.

@Eelstone
Copy link
Author

Eelstone commented Nov 1, 2023

Thanks! I have now executed this beta. For your info - I noticed in this beta release that the language setting keeps returning to German even though I change to English (but just a minor comment).

Please find the log file from your beta attached. The same behavior and I can confirm your assumption that the difference between the two scenarios is indeed that the monitor goes into sleep mode (probably to save energy and I can't really find any local monitor setting to disable that and in the best case scenario I wouldn't want to do that either ;)

WinMute_2.log

@lx-s lx-s modified the milestones: Future, 2.5 Nov 2, 2023
@lx-s
Copy link
Owner

lx-s commented Nov 2, 2023

Ah, I see the problem now. Could you try this version winmute_beta.zip ?

Thanks!

P.S.: Ignore all the language stuff - I'm currently working on the plumbing that loads strings and everything. The UI stuff does not work at all yet :)

lx-s added a commit that referenced this issue Nov 2, 2023
@Eelstone
Copy link
Author

Eelstone commented Nov 2, 2023

Wow, your magic seems to work! :-) Now the monitor unmuted even after going into sleep mode. I will do some further testing of course and let you know any issues. Please find the latest log file attached that reflects the new behavior.

WinMute_3.log

@lx-s
Copy link
Owner

lx-s commented Nov 2, 2023

Awesome - the log file looks just as I wanted it to be.
I'll closethe issue for now and merge the fixes into the next version. You can just keep using the beta :)

If there are any issues regarding this bug, just comment on this issue again or open a new one!

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

No branches or pull requests

2 participants