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

[BUG] Different numbers of packages to update across multiple monitors #665

Open
1 task done
ArekKubinski opened this issue Feb 1, 2025 · 9 comments
Open
1 task done
Assignees
Labels
bug Something isn't working to be confirmed Issue is currently under review and has not been released

Comments

@ArekKubinski
Copy link

Describe the bug

Image

The number of packages to update near the icon is not consistent, sometimes it shows differences up to 100.
Example 123 on the right and 16 on the left (i should took ss before i updated but i hoped the bug will be gone i actually saw it appear since the begging of my setup)

Steps to reproduce

I use this monitor config

monitor= desc:HP Inc. HP 27xq CNK046117C, 2560x1440@143.86, 0x0, 1
monitor= desc:Acer Technologies Acer BW257 0x0127B1A6, 1920x1200@59.95, 2560x0, 1
monitor= desc:LG Electronics LG TV 0x01010101, 3840x2160@59.95, auto, 1, mirror, desc:HP Inc. HP 27xq CNK046117C
monitor = , preferred, auto, 1

This setup is a dual monitor with mirrored screen on the left to the TV and 4th option is for any additional screen to configure it with default options.

Expected behavior

I expected the numbers to be the same across all monitors

Screenshots

No response

Distribution

Arch Linux

If Other, specify

Linux 6.12.10-arch1-1

Additional context

This is freshly updated and reported as fast as I noticed update alert show up.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ArekKubinski ArekKubinski added the bug Something isn't working label Feb 1, 2025
@mylinuxforwork mylinuxforwork added the to be confirmed Issue is currently under review and has not been released label Feb 2, 2025
@mylinuxforwork
Copy link
Owner

@ArekKubinski I thinks the reason is that both status bars send independently the request to the update script. Can you wait min 30 minutes and check then again if both are showing then the right number?

Or try to reload your waybars with SUPER + SHIFT + B

@ArekKubinski
Copy link
Author

So this is a state right after reboot, i believe that the state on the left monitor is real state and on the right there is no updates according to icon (rather the lack of any icon).

Image

After that I reloaded waybars (they both disappear and appear visually at the same time) and the number moved from left monitor to the right.

Image

I had mouse on the right monitor while reloading first time but moving mouse to the left monitor and reloading once again changed noting (repeated that few times, every time result was identical like on the second ss).

@mylinuxforwork
Copy link
Owner

Crazy. Actually no clue how to fix this.

@ArekKubinski
Copy link
Author

Any idea how I can debug it? For some time it kinda was fine since on one waybar it was 0 and as such didn't showed up at all. But today its again 1 and 47 and it kinda driving me mad 😃

Image

@degobbis
Copy link
Contributor

degobbis commented Feb 7, 2025

I might have an idea on how to solve this.
This afternoon I'll get to work on a PR.

The problem may be due to the fact that the script is called several times when the waybar is called on several monitors (2 extra in my case), but does not deliver consistent results due to the locked Pacman database.

So my idea is to delay the check in the script until the database is free again.

It can still happen that a new package is added to the update during the delay, but the differences should be minimal and rare.

degobbis added a commit to degobbis/dotfiles that referenced this issue Feb 7, 2025
@degobbis
Copy link
Contributor

degobbis commented Feb 7, 2025

This Changes solves the issue (#707)

mylinuxforwork added a commit that referenced this issue Feb 7, 2025
@mylinuxforwork
Copy link
Owner

mylinuxforwork commented Feb 7, 2025

@ArekKubinski Just merged into the main branch. Can you please test? Install ml4w-hyprland-git, rebuild all packages and run ml4w-hyprland-setup

@ArekKubinski
Copy link
Author

Truth be told I rather not move to unstable branch just to test this but replaced updates.sh and after refreshing waybar this seems to work as intended. I can see delay now but I guess it is better than being just plain wrong. Seems closed to me and I'm waiting for it to be released. Thanks very much to all involved.

@ArekKubinski
Copy link
Author

Truth be told I rather not move to unstable branch just to test this but replaced updates.sh and after refreshing waybar this seems to work as intended. I can see delay now but I guess it is better than being just plain wrong. Seems closed to me and I'm waiting for it to be released. Thanks very much to all involved.

Okay this seems to occur only after restart but the count is different on both monitors, idk if it is because I didn't moved to -git branch and there are more scripts to be replaced but fresh start have this bug, reloading waybar gets rid of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to be confirmed Issue is currently under review and has not been released
Projects
None yet
Development

No branches or pull requests

3 participants