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

Always shown as available when locked, even if "awayOnSystemIdle=true" #1453

Open
willbennett-kaltura opened this issue Oct 16, 2024 · 5 comments

Comments

@willbennett-kaltura
Copy link

Describe the bug
When --awayOnSystemIdle=true, I would expect to be shown as away or idle when I lock my computer, but instead I am eternally green. The issue is that teams will not forward messages to my phone while I am green, so during lunch or after work I don't ever see messages that sometimes are important.

To Reproduce
Steps to reproduce the behavior:

  1. Launch app with --awayOnSystemIdle=true and --appIdleTimeout=10 (for debugging)
  2. Go idle, see state change to idle
  3. Lock screen, see state changed to "lock", and have someone else check your status, you will be green

Logs
10:45:49.108 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 30s, IdleState: 'idle'
10:45:51.109 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 32s, IdleState: 'idle'
10:45:53.121 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
10:46:03.128 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 5s, IdleState: 'locked'
10:46:05.172 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 7s, IdleState: 'locked'

Expected behavior
To not be green forever.

Desktop (please complete the following information):

  • OS: CachyOS
  • AUR
  • Version: 1.11.0-1
@kindofblues
Copy link
Contributor

kindofblues commented Oct 17, 2024

Hi @willbennett-kaltura,

I think there has been a code refactor since I made this PR #1335 (see related discussions).

It did fix the logic when --awayOnSystemIdle=false and, for that case, it still works as it should (forever green/available).

Looking at the code right now, I guess either this check takes the wrong path:

if (this.config.awayOnSystemIdle) {

Or the bug is within this function:

setStatusAwayWhenScreenLocked(state) {

Note that I did not change the code in this last function in my PR, as it handles the case when --awayOnSystemIdle=true, and that was working fine back then.

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Oct 18, 2024

those code changes are for version 1.11.2. The version 1.11.0 still uses the older version

https://github.com/IsmaelMartinez/teams-for-linux/blob/v1.11.0/app/browser/notifications/activityManager.js

@willbennett-kaltura , are you able to run the app with --logConfig={} ? It will give us more logs and help us understand if this is a teams v1 or v2 issue.

I didn't write that logic what makes it a bit more difficult to digest.

Also, probably don't use the --appIdleTimeout=10 as I have seen issues with those timeouts getting confused (see #1320)

@willbennett-kaltura
Copy link
Author

those code changes are for version 1.11.2. The version 1.11.0 still uses the older version

https://github.com/IsmaelMartinez/teams-for-linux/blob/v1.11.0/app/browser/notifications/activityManager.js

@willbennett-kaltura , are you able to run the app with --logConfig={} ? It will give us more logs and help us understand if this is a teams v1 or v2 issue.

I didn't write that logic what makes it a bit more difficult to digest.

Also, probably don't use the --appIdleTimeout=10 as I have seen issues with those timeouts getting confused (see #1320)

Same issue with --logConfig={} and without --appIdleTimeout:

13:52:10.961 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
13:52:12.963 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
13:52:14.966 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
13:52:16.968 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
13:52:18.971 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'

Honestly, I'd really like an option for immediately going idle on lock. Often times when I locked my computer, it means I'm afk and I'd like to get the notifications on my phone if possible.

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Oct 21, 2024 via email

@IsmaelMartinez
Copy link
Owner

Hi @willbennett-kaltura , sorry for taking my time. I have been trying to digest some of the activityManager area and the system idle, but lets say it needs a lot of TLC.

Are you able to put all the logs, not only some lines? There is a screenlock inhibitor that might not getting disabled in some cases. That was added a while back ( #613 ) and might be taking part on this issue.

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