-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
100% cpu after Xorg exits #33
Comments
This is primarily an issue with your startup method rather than a activitywatch. In unix/linux if a process dies it kills all of its children, so if you start aw-watcher-window straight from a terminal window (without tmux or something like that) it will close when you close the window, the same thing goes for your windowmanager. Personally at home I run bspwm and have aw-server running as a systemd service while I start aw-watcher-{window,afk} in my .xinitrc which works fine even after I restart the wm. However, even if aw-watcher-window fails to communicate with the Xorg server it should still not use 100% CPU. Not sure what is causing that, maybe take a look at the log and stdout? |
Well that's an interesting bug. From a quick glance I'm not sure what takes up all the CPU but if you could provide the output of |
Launching:
Shutting down Xorg:
Hitting Ctrl-C after awhile of 100% cpu:
|
in a manner similar to @johan-bjareholt I moved the initialization of aw-watcher-* to |
https://github.com/python-xlib/python-xlib/blob/master/Xlib/protocol/display.py#L427 This is likely the cause, don't have time to dig through the Xlib code now but might later. |
I run a single user system and I frequently start and exit X through xrdp. The start of
aw-watcher-window
is part of my wm launching configuration (.i3/config in my case). When Xorg exits aw-watcher-window goes to 100% cpu usage. I've written https://gist.github.com/phromo/6a41be2bc4d716751eee2eb29856d4bb as a workaround, but that's not the proper way to do it :)The text was updated successfully, but these errors were encountered: