-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Despite closed LID on startup, bar is loaded on closed laptop screen #798
Comments
Could you attach the full niri output when reproducing the issue? |
Sure. Sorry for asking, how to access the output when running niri directly from my desktop manager and not from inside anther session? |
On systemd it's |
Yes, but I'm not on I run Void Linux, with a locally merged PR for adding niri to I already checked the general logs of my distro, but are no error messages regarding niri. |
Can you redirect the output? Like |
Have to try it. I'll come back to you as soon as I got some more informations |
That way, I was able to generate some output:
I start yambar through a little script since it has to wait a second for config.kdl:
The script itself has the following content: load_yambar.sh: #!/usr/bin/env bash
sleep 2
exec yambar --log-level none --backend wayland & But its the same behaviour if I start
|
Seems like the lid close event arrives ~8 seconds after the compositor start |
That would explain the positioning of the bar on the wrong screen. Any ideas what causes that? AFAIK I have no specific settings which might interfer with the lid. If you need more informations, especially because systemd free Void might not be the most common setup, I'll try to provide them... |
Not sure. Niri just listens to libinput, so it gets the event whenever libinput sends it. Could your yambar setup maybe react to the screen disappearing and reposition itself to another screen? |
Thats very unlikely. Yambar is not that dynamic. In the docs it states explicitly that the bar is only started for the current screen and has to be manually started for a second one. Its strange that the event is send so late. I assume libinput is also responsible for setting |
Another thing you could do is bind lid-open and lid-close to restart yambar: https://github.com/YaLTeR/niri/wiki/Configuration:-Switch-Events#lid-close-lid-open I believe libinput uses an evdev switch event for the lid switch. |
Ok, interesting. If I start niri directly from a tty running Thus, it might have something to do with my desktop manager
But I couldn't figure out the particular reason, since even when running from a tty there is a delay between starting niri and receiving the lid event. It just doesn't have any effect on the bar placement... |
Well I guess this doesn't look like a niri issue then. Still, try restarting yambar using the niri lid switch bindings? |
Yes, very likely not. Therefore, I close the issue.
Is possible, but since there can be multiple instances of yambar running which are all visible, I need to always kill the running processes manually and restart it then. Its easier to start the bar manually. But I will investigate that further and report if I have a solution... |
I recently upgraded to niri v.0.10.1 So far, everything works great despite one thing regarding the laptop LID.
Normally, when I boot my laptop, the LID is closed and I use my HDMI as main screen. Until the version upgrade I used a custom script to check if the LID is closed (which I wrote for my former sway setup). If so, the laptop screen was disabled and the HDMI was set as main output. It worked flawlessly with niri too.
Now, after the upgrade, I disabled the script because niri autodetects if the LID is opened. That works just fine regarding notifications and regular windows. But on startup my bar (yambar) is not shown on the HDMI screen. For some reasons it starts on the closed laptop screen.
I tried changing the way yambar is executed, but that doesn't change anything.
Its only working if I use my custom script again which now only on startup checks if the LID is open or closed and disables the laptop screen if needed.
After startup everything works fine with the new LID detection.
System Information
The text was updated successfully, but these errors were encountered: