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

Lock screen from screensaver #4

Closed
blarg3891 opened this issue Nov 2, 2020 · 25 comments
Closed

Lock screen from screensaver #4

blarg3891 opened this issue Nov 2, 2020 · 25 comments
Assignees
Labels
Milestone

Comments

@blarg3891
Copy link

Love the app. Thought it would work this way. I have "Screen Saver Settings" set to "On resume, display logon screen." This effectively locks the screen. For some reason though, during my testing, sound was still coming through when the screen locked this way. When I lock the screen with windows+L sound is muted. Not sure if the login state is somehow different in this scenario... Anyway, I saw the beta release that allows to lock during specific times so I'll take a look at this. I'm mostly concerned about muting during the nighttime hours.

@lx-s
Copy link
Owner

lx-s commented Nov 4, 2020

I'll check this - maybe the screen-lock signal get's lost when "screensaver ends" and "workstation locks" happen right after another.

@lx-s
Copy link
Owner

lx-s commented Nov 27, 2020

So, I have verified your bug and have to rework my "already muted" detection a bit, since the timing of the events "screensaver starts, screen gets locked, screensaver stops, screen gets unlocked" is not always in perfect order.

Also I could verify why sometimes the sound does not get muted, when your screensaver starts and added it to the README: https://github.com/lx-s/WinMute#known-issues

Unfortunately I have to postpone the fix for this problem to a later time, since I am not sure yet how to overcome this issue. Screensaver detection is really wonky on Windows. For now, you should make sure, that the foremost Window is your desktop or a 64-bit application (or 32-bit). Sorry for that inconvenience. :/

@blarg3891
Copy link
Author

I'll look forward to it one day in the future :)

@lx-s
Copy link
Owner

lx-s commented Dec 4, 2020

I had an idea and implemented it.
Good news: In my tests, WinMute now mutes when the screensaver starts regardless whether the top window belongs to a 64bit or 32bit process.
Bad news: Everything got a bit uglier (screensaver detection is really a mess on Windows) and I'll postpone the 1.6 release a bit more.

Attached you'll find the current beta, if you want to try.
WinMute_1.6.0_beta6.zip

@lx-s lx-s added the bug label Dec 4, 2020
@lx-s lx-s self-assigned this Dec 4, 2020
@lx-s lx-s added this to the 1.6 milestone Dec 4, 2020
@blarg3891
Copy link
Author

Wow, awesome. I will test it out.

@lx-s
Copy link
Owner

lx-s commented Dec 18, 2020

Fixed in version 1.6.0

@lx-s lx-s closed this as completed Dec 18, 2020
@blarg3891
Copy link
Author

So, this seems to sometimes work but it has been inconsistent. I'm not sure how or why, but sometimes i come back to my computer and its still muted after logging in, or i'll hear noises coming from my speakers after screen is locked. I tested this with quite hours enabled and disabled to make sure that wasnt part of the issue, but it remained unstable. Again, I know there is complexity here so it may be impossible to fix... I'm also not sure if somehow rebooting my computer might resolve the issue as I don't reboot very often either. Is there a way to see a logfile of mutes/unmutes maybe it may help troubleshoot.

@lx-s
Copy link
Owner

lx-s commented Jan 13, 2021

Hrmpf! I’ll add logs in the coming days and get back to you. Sorry :/

@lx-s lx-s reopened this Jan 13, 2021
@lx-s
Copy link
Owner

lx-s commented Feb 11, 2021

Just want to check-in that I've not forgotten adding logs.
There's just a lot going on currently and I haven't found the time to add this (albeit it's not a huge task).
I'll get back to you within the next two weeks though.

Sorry for keeping you waiting :/

@blarg3891
Copy link
Author

blarg3891 commented Feb 11, 2021 via email

@lx-s
Copy link
Owner

lx-s commented Mar 31, 2021

Welp. Finally: WinMute_1.6.1_WithLog.zip

The logfile is named WinMute.log and is created in your Temp-Directory (just press Windows-Key + R, enter %TEMP% and press Return).

Thanks for your help and your patience

@blarg3891
Copy link
Author

blarg3891 commented Mar 31, 2021 via email

@blarg3891
Copy link
Author

blarg3891 commented Apr 2, 2021 via email

@lx-s
Copy link
Owner

lx-s commented Apr 3, 2021

Ah yes... this bug was sponsored by copy-and-paste-errors.

Here is a new build: WinMute_1.6.1_WithLog2.zip

Thanks :)

@blarg3891
Copy link
Author

blarg3891 commented Apr 3, 2021 via email

@blarg3891
Copy link
Author

blarg3891 commented Apr 6, 2021 via email

@blarg3891
Copy link
Author

blarg3891 commented Apr 6, 2021 via email

@lx-s
Copy link
Owner

lx-s commented Apr 13, 2021

The image didn't work unfortunately.

But your text does :) I have an idea what might be the problem:

When more than one mute event happens within/interleaved with one another it's hard to keep track of the "state-stack" and if I should unmute or not (e.g. quiet-hours->screensaver-starts->screensaver-stops->workstation gets locked->quiet hours end->workstation gets unlocked). I guess that logik gets confused during some event combinations.

I will rethink my approach how to handle this more straightforward and hopefully less bug prone.

@blarg3891
Copy link
Author

blarg3891 commented Apr 13, 2021 via email

@lx-s
Copy link
Owner

lx-s commented Apr 16, 2021

You accept donations?

Uh. Wow :) I feel really honored.

I have to check what that would mean for my taxes, as the Germany government tends to make such things more troublesome than it's worth most of the time, but I think it would work. I'll get back to you on that.

Even if it doesn't pan out: Your offer alone is greatly appreciated!

@blarg3891
Copy link
Author

blarg3891 commented Apr 16, 2021 via email

@blarg3891
Copy link
Author

blarg3891 commented Apr 19, 2021 via email

@blarg3891
Copy link
Author

blarg3891 commented Apr 30, 2021 via email

@lx-s lx-s modified the milestones: 1.6, 1.7 Dec 8, 2021
@lx-s
Copy link
Owner

lx-s commented Apr 7, 2022

Hopefully all this timing related problems are now fixed with the 1.9-pre-release: https://github.com/lx-s/WinMute/releases :)

@lx-s
Copy link
Owner

lx-s commented May 2, 2022

Closing this issue. Just reopen if this still happens with 2.0!

@lx-s lx-s closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants