Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] Countdown clock text is inaccurate #79

Closed
RoyalOughtness opened this issue Jun 25, 2024 · 14 comments
Closed

[BUG] Countdown clock text is inaccurate #79

RoyalOughtness opened this issue Jun 25, 2024 · 14 comments

Comments

@RoyalOughtness
Copy link
Contributor

RoyalOughtness commented Jun 25, 2024

After triggering the lockout mechanism and the 30 second countdown, each second on the countdown takes about 1.5-2 seconds, clearing once it hits around 13 seconds remaining.

I used a stopwatch to time it, and the locking mechanism is accurate, it locks for 30 seconds. Just the countdown text itself is inaccurate.

@RoyalOughtness RoyalOughtness changed the title [BUG] Countdown clock is inaccurate [BUG] Countdown clock text is inaccurate Jun 25, 2024
@RoyalOughtness
Copy link
Contributor Author

RoyalOughtness commented Jun 25, 2024

I wonder if this is caused by lag in pam invoking conv.send()?

However I don't recall this on earlier versions of pam-authramp

@wandapeter
Copy link
Owner

I've noticed this before. I think it is a latency issue. One possible fix could be to only send a message every two seconds to get a more accurate remaining time. what do you think?

@wandapeter
Copy link
Owner

I wonder if this is caused by lag in pam invoking conv.send()?

However I don't recall this on earlier versions of pam-authramp

hmm i'll test it with pamtester. If there is the same issue, then it must lie with the authramp implementation.

@RoyalOughtness
Copy link
Contributor Author

thanks, and FYI this is on any secureblue silverblue image with tag br-staging-40

@wandapeter
Copy link
Owner

This is OS or display manager latency. When using pamtester the 30s are actually 30s. Tested this with a stoppwatch. In theory displaying the message every 2nd second should help with the accuracy.

@wandapeter
Copy link
Owner

16fd9f8

@RoyalOughtness
Copy link
Contributor Author

@34N0 That makes sense. Making this configurable could be an easy fix.

Or also, what about just displaying the timestamp when the user will be able to try again?

Something like Locked until 2024-07-15 03:35:00 PM

@RoyalOughtness
Copy link
Contributor Author

16fd9f8

That works too :)

Thanks

@wandapeter
Copy link
Owner

lazy fix for now. but i am open for something simpler like the timestamp idea!

@RoyalOughtness
Copy link
Contributor Author

Something like Locked until 2024-07-15 03:35:00 PM

I wonder though, do you think this is an option on SDDM or LightDM? or would it still not work?

@wandapeter
Copy link
Owner

I think it wouldn't change the experience a lot on LightDM since it allways displays the latest countdown message but doesn't count lower automatically. SDDM does not display any PAM messages. It does not support it.

@RoyalOughtness
Copy link
Contributor Author

I see, makes sense

@RoyalOughtness
Copy link
Contributor Author

the countdown is much more accurate now!

there's still a little bit of drift, but it's roughly correct. Making this configurable or the timestamp I mentioned would be good nice-to-have features to make the experience even better, but overall it's working well on GNOME now! 🥳

@wandapeter
Copy link
Owner

From now on, when looping is disabled in config a timestamp will be displayed.
#83

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

No branches or pull requests

2 participants