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

Laggy output on laptop battery power. #1008

Open
mateuszskoczen opened this issue Jan 6, 2024 · 11 comments
Open

Laggy output on laptop battery power. #1008

mateuszskoczen opened this issue Jan 6, 2024 · 11 comments

Comments

@mateuszskoczen
Copy link

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
Copy link
Owner

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

@mateuszskoczen
Copy link
Author

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

@tobi-wan-kenobi
Copy link
Owner

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
Copy link
Author

If I only know how to do it, sure.

@tobi-wan-kenobi
Copy link
Owner

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
Copy link
Author

mateuszskoczen commented Jan 13, 2024

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
Copy link
Owner

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
Copy link
Author

  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 added a commit that referenced this issue Jan 15, 2024
The only idea I have regarding #1008 is that it might be a concurrency
issue caused by low CPU speed (scaling). Delay starting the event and
command threads and see if that improves the situation.

see #1008
@tobi-wan-kenobi
Copy link
Owner

@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
Copy link
Author

Nothing changed

@tobi-wan-kenobi
Copy link
Owner

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:

  • Unplugging the power supply makes the bar (but only the bar) really slow
  • After a reboot, you need to manually restart the status bar for data to show?

mihaimorariu pushed a commit to mihaimorariu/bumblebee-status that referenced this issue May 6, 2024
The only idea I have regarding tobi-wan-kenobi#1008 is that it might be a concurrency
issue caused by low CPU speed (scaling). Delay starting the event and
command threads and see if that improves the situation.

see tobi-wan-kenobi#1008
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

2 participants