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

python3 process runs on full CPU capacity when keyboard disconnected #1

Open
michal7918 opened this issue Aug 16, 2021 · 3 comments
Open

Comments

@michal7918
Copy link

michal7918 commented Aug 16, 2021

Thank you for useful script! It fixed chattering problem with my Rapoo E9260 keyboard and works better than other solutions suggested elsewhere.

Unfortunately since I run it on notebook with docking station, I frequently undock my notebook and then problem starts. In most cases (not every time), soon after the dock and keyboard is disconnected, the python3 process starts consuming full CPU thread capacity, leading to ventilator running in full speed until the process is terminated. It happens both in case running script from service or command line.

I hope you can fix this issue.

@finkrer
Copy link
Owner

finkrer commented Aug 16, 2021

Hi Michal. Thanks for reporting the issue.

The code is very simple, so it's obvious what's wrong. I just need to figure out how to prevent that. I don't use the script anymore as I have a new keyboard, but I will try to find time to work on this in the coming days.

@michal7918
Copy link
Author

Thank you. I'm not familiar with python but I assume that basic problem is that scripts assume that device is always connected. I hope you can figure out solition to this issue. Thank you so much for looking at that. Cheers.

@CarlosRuiz-globalqss
Copy link

I just tried running this as a system service.

When the keyboard is disconnected the service is stopped, and when the keyboard is connected again the service is started automatically.

So, working like a charm as a service.

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