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

Flickering/blinking when using sway hide mode and IPC #3750

Open
mavaa opened this issue Nov 8, 2024 · 4 comments
Open

Flickering/blinking when using sway hide mode and IPC #3750

mavaa opened this issue Nov 8, 2024 · 4 comments

Comments

@mavaa
Copy link

mavaa commented Nov 8, 2024

Not sure if this belongs here or in the sway repo, but after one of the latest sway and/or waybar updates, my bar started flickering/blinking when hidden by sway. I've observed this on multiple machines, both with AMD and NVidia GPUs. I'm using this configuration for sway to have the bar show/hide when I use the win key:

bar {
    swaybar_command waybar
    mode hide
    position top

}

I've also minified my waybar config to try to identify if anything triggers it. This config at least reproduces it:

// -*- mode: jsonc -*-
{
    "spacing": 0, // Gaps between modules (4px)
    "ipc": true,
    "modules-left": [
        "sway/workspaces",
        "sway/mode",
        "sway/scratchpad",
    ],
    "modules-center": [
        "sway/window"
    ],
    "modules-right": [
        "mpris",
        "pulseaudio",
        "memory",
        "temperature",
        "keyboard-state",
        "battery",
        "battery#bat2",
        "clock",
        "tray"
    ],
}

Removing the tray item sometimes seems to fix the issue, and stopping nm-applet greatly reduced the flickering, but after restarting sway a few times it sometimes comes back. And even when not flickering, very often a black bar stays where the waybar used to be. It seems almost as if the more stuff I add to my config, the worse it gets. Moving the mouse to the screen with flickering often (but not always) removes it. I tried to capture some video of the issue, but due to framerate and/or the fact that OBS is recording the screen, it doesn't pick up the full effect:

2024-11-08_10-11-13.mp4

In reality, when looking on my monitor, the black line observed at the top is flickering on and off like crazy, several times per second. I also have a stylesheet with catppuccin theme added in the video above, but the same issue still happened if I removed it.

@lkp26k
Copy link

lkp26k commented Nov 9, 2024

Have the same problem. Tried to fix it the last three days. I'm exhausted about it. I'd be very grateful for anything remotely helpful.

waybar -l debug shows that the visibility state is switched correctly. I was assuming something in the GTK direction, but that's a blind guess and fiddling there wasn't successful.

I'm on Arch with Intel/Nvidia (nouveau) GPU. I'm new to this, so I don't know what information is relevant to share - just let me know :)

Edit: The screen capture mavaa did is a very good representation of what I see as well. The bar should be hidden but a black shadow bar remains. At the position where modules are normally, the black shadow parts sometimes disappear. I tried it with a most minimal bar (just a clock) and build it up from there. The more modules I added (especially system stuff, eg memory, cpu, ...) the worse it got. I couldn't find a breaking point - the behavior just worsened.

@wkordalski
Copy link

wkordalski commented Nov 13, 2024

I have the same issue on NixOS/unstable with AMD integrated graphics.

I've checked that this commit to nixpkgs introduces the bug on my system.
The commit updates sway (from 1.9 to 1.10) and wlroots (from 0.17 to 0.18).

Maybe this helps someone to fix this issue.

@SeabertYuan
Copy link

I was struggling with this problem too, and unfortunately I think this is a duplicate of #3492. I had to just accept not hiding my bar for now.

@lkp26k
Copy link

lkp26k commented Nov 22, 2024

I was struggling with this problem too, and unfortunately I think this is a duplicate of #3492. I had to just accept not hiding my bar for now.

Good call. The issue you linked has some good info in it. Maybe it gets fixed anytime soon.

I'm not giving up any vertical pixel. Switched back to the basic Swaybar. 'Hide' works fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants