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.23k stars 228 forks source link

Laggy output on laptop battery power. #1008

Closed mateuszskoczen closed 2 weeks ago

mateuszskoczen commented 11 months ago

Bug Report

Description

Affected module: all Version used: latest AUR ; 2.2.0-1

Description: When I unplug my laptop charger status bar is very laggy. Even when I set intervals and change for example brightness using media keys or scroll, I have to wait multiple seconds to see the proper value. When I use charger everything is all right.

How to reproduce

Unplug laptop charger and change f.e. brightness or volume using media keys or scroll on bar.
tobi-wan-kenobi commented 10 months ago

This rings a bell - is that a new or an older laptop? Otherwise, the system runs fine, is that true?

mateuszskoczen commented 10 months ago

My system is fine, laptop is about 3-4 years now.

tobi-wan-kenobi commented 10 months ago

I suspect it might somehow be related to speed stepping, but I have no idea how to even reproduce this.

Would you be wiling to try a debug binary?

mateuszskoczen commented 10 months ago

If I only know how to do it, sure.

tobi-wan-kenobi commented 10 months ago

After reading up on possible causes a bit, I have to admit I have no idea how to troubleshoot this further.

If you restart i3 after unplugging (i3-msg restart), does it start working normally?

Also, which OS and which version of Python are you using?

mateuszskoczen commented 10 months ago

Arch linux 6.6.10-arch1-1 Python 3.11.6 After restart I have to wait something around 10 second to load it again and it doesn't work normally.

tobi-wan-kenobi commented 10 months ago

You mean it takes 10s for the bar to load?

If you start bumblebee on the commandline, does it output data normally (once per second)?

mateuszskoczen commented 10 months ago

1) yes 2) it doesn't show any output and gives few errors

  /usr/share/bumblebee-status/bumblebee-status -m nic disk:root         cpu memory battery date time pasink pasource dnf         -p root.path=/ time.format="%H:%M CW %V" date.format="%a, %b %d %Y"         -t solarized-powerline
{"version": 1, "click_events": true}
[
[2024-01-13 14:21:57,948] bumblebee-status ERROR    'ff26c72c-beaf-495a-96a4-8f62042280fd'
Traceback (most recent call last):
  File "/usr/share/bumblebee-status/bumblebee-status", line 152, in <module>
    main()
  File "/usr/share/bumblebee-status/bumblebee-status", line 142, in main
    core.event.trigger("draw")
  File "/usr/share/bumblebee-status/bumblebee_status/core/event.py", line 35, in trigger
    callback()
  File "/usr/share/bumblebee-status/bumblebee_status/core/event.py", line 7, in <lambda>
    cb = lambda: callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/bumblebee-status/bumblebee_status/core/output.py", line 186, in draw
    data = cb(args) if args else cb()
                                 ^^^^
  File "/usr/share/bumblebee-status/bumblebee_status/core/output.py", line 299, in statusline
    blocks.extend(self.blocks(module))
                  ^^^^^^^^^^^^^^^^^^^
  File "/usr/share/bumblebee-status/bumblebee_status/core/output.py", line 264, in blocks
    blocks.append(self.__content_block(module, widget))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/bumblebee-status/bumblebee_status/core/output.py", line 219, in __content_block
    blk.set("full_text", "\u2026" if self.__content[widget.id]["minimized"] else self.__content[widget.id]["text"])
                                     ~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'ff26c72c-beaf-495a-96a4-8f62042280fd'
[{"full_text": " 'ff26c72c-beaf-495a-96a4-8f62042280fd' ", "background": "#ff0000", "color": "#ffffff", "name": "error", "instance": "the-only-one"}],
tobi-wan-kenobi commented 10 months ago

@mateuszskoczen I have pushed a somewhat experimental change to main, so if you could update your installation to the git version of AUR, maybe the situation improves.

mateuszskoczen commented 10 months ago

Nothing changed

tobi-wan-kenobi commented 9 months ago

Sorry to take so long to get back to you. I have been thinking about this issue a lot, and have no real idea how to fix it (because I cannot reproduce it).

I have, however, come up with a possible workaround: Would a configurable "startup delay" work for you? I.e. you can set in your config "wait for 10s to actually start bumblebee", so you would not have to manually restart bumblebee. You'd just get a blank bar for a couple of seconds, and once your system is "ready", the status bar starts.

Also, do I understand it correctly that you are actually facing 2 issues:

tobi-wan-kenobi commented 2 weeks ago

closing due to inactivity