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

cpu usage is tenfold after commit fd86e67 Limit UI refresh frame rate #113

Closed
ghost opened this issue Oct 30, 2023 · 5 comments
Closed

cpu usage is tenfold after commit fd86e67 Limit UI refresh frame rate #113

ghost opened this issue Oct 30, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 30, 2023

The cpu usage is tenfold after commit fd86e67 Limit UI refresh frame rate.
Before this commit the cpu usage for an idle tuigreet process was at about 0.65 percent.
After this commit the cpu usage for an idle tuigreet process is at about 6.5 percent.
I'm not sure if this is related, but the cursor in the password field blinks at very irregular intervals.

@apognu
Copy link
Owner

apognu commented Oct 30, 2023

Thanks for reporting this, I'll have a look.

The cursor was already blinking inconsistently in previous versions for me and some reporters (which I attributed to crossterm but it may be that I did something wrong in that update.

Was the cursor okay for you before the update?

If you could also try with the commit before that one, to check if it is the issue, that would be great. Because we also updated the TUI library that we use a few commits before.

@ghost
Copy link
Author

ghost commented Oct 30, 2023

Thank you for looking into this.
The cursor is about the same as before, so that is not related to this issue.
I did find this crossterm issue: #71. Would using SetCursorStyle to disable blinking help? This was introduced in https://github.com/crossterm-rs/crossterm/pull/742/commits
In case I can help testing please let me know.

@apognu
Copy link
Owner

apognu commented Oct 30, 2023

I tried all those cursor style options, they are not being respected by the TTY unfortunately.

I'll see if I can reproduce the high CPU usage, though and report back.

@apognu
Copy link
Owner

apognu commented Nov 4, 2023

The latest commit on master should hopefully revert the CPU usage regression (and maybe even improve it a bit). Could you verify that things are working properly and that you are not seeing the issue anymore?

@ghost
Copy link
Author

ghost commented Nov 4, 2023

Thank you very much for the update :-)
The CPU usage is now at about 0.3 percent, so indeed even quite lower than originally. And the result, as in blinking, is a lot better.
The attempts to disable blinking probably failed because this requires root privillege, or at least write acces to perform:
echo 0 > /sys/class/graphics/fbcon/cursor_blink
I'll try to find the correct kernel parameter for users who want to use that tomorrow, so this might be added to the README.md.

@apognu apognu closed this as completed Nov 5, 2023
@apognu apognu self-assigned this Nov 5, 2023
@apognu apognu added the bug Something isn't working label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant