tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.22k stars 228 forks source link

vpn module will make bumblebee-status spike cpu if no vpn profile is selected #898

Closed nwildner closed 2 years ago

nwildner commented 2 years ago

Bug Report

Description

Affected module: vpn, but additionally, maybe some other bumblebee-status component that handle menus. Version used: main branch, directly from git.

If you have multiple OpenVPN profiles on NetworkManager, and by accident you hover your mouse out of the VPN drop-down menu or, you decide to not connect on a vpn by going back to the module and clicking on it, this will make the drop-down menu unavailable, and cpu usage spike on bumblebee-status processes.

How to reproduce

1 - Have multiple vpn profiles configured on NetworkManager(currently, tested only with OpenVPN ones) 2 - Click on the vpn module(currently off) to activate drop-down menu 3 - "Accidentally" move your mouse out of the menu 4 - Open top or htop and check out that bumblebee-status will be consuming a lot of cpu. Laptop users will hear the fans start to work louder:

image

Workaround

1 - Reload your DE(in my case, i3wm)

Expected behavior

1 - Moving the mouse out of the menu or clicking back on the module should only collapse/hide the menu without using extra CPU.

tobi-wan-kenobi commented 2 years ago

@bbernhard I think that module is originally developed by you - have you observed that as well, or do you have any idea where that could come from? Thank you!

bbernhard commented 2 years ago

@nwildner what do you exactly mean by "move your mouse out of the menu"? When I do that, the popup window immediately closes. Is that the same for you? For me, bumblebee-status only consumes more CPU while the popup is shown. As soon as the popup closes (which it does when I move the mouse outside of the popup), the CPU usage drops again.

Unfortunately, I do not know much about the internals of tkinter, but I think most GUI frameworks paint in the main thread. So I guess a higher CPU usage could be normal while the popup is shown?

tobi-wan-kenobi commented 2 years ago

Closing due to a combination of inactivity and "could not reproduce" (many thanks to @bbernhard for testing!)

If the issue still persists, please feel free to reopen the ticket & I will have a closer look.