-
-
Notifications
You must be signed in to change notification settings - Fork 385
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] Crash when monitor turned off #1158
Comments
can confirm. whenever I turn off my monitor the eww window crashes |
is this happening on wayland or on X11? Is it actually related to the monitor, or is it the entire computer going to sleep? |
oh sry, should have added that. Yeah, its wayland. it crashes with
|
ah, its when I manually turn off my monitor either by unplugging or just hitting the poweroff button |
I'll try to investigate within the next few days 👍🏻 Thanks for the report! |
I think this issue has more to do with Wayland or hyprland. I'm using hyprland, and when I turn my monitor off, the active workspace gets set to workspace 6 even though I have only 5 workspaces configured. Which might cause eww to crash? |
I ran into this as well on wayland/hyprland. 2 monitor setup with What I tried is to start eww with while eww is running, do a
monitor.sh is
but it seems like once the in addtion, when disabling one monitor eww crashes which prevents
wrapping up: |
Found a good hint here: nwg-piotr/nwg-panel#344 (comment) and adapted it to a script that fits my setup
#!/bin/bash
main=DP-3 # name of main display
side=HDMI-A-1 # name of secondary
# listen to udev events
udevadm monitor --udev --subsystem-match=drm | while read -r line; do
if echo "$line" | grep -q "change"; then
echo "monitors changed"
count=$(hyprctl monitors -j | jq '.[].name' -r | wc -l)
echo "$count devices available"
if [[ "$((count))" -eq "2" ]]; then
echo $main
eww open mainbar --screen=$main
else
echo $side
eww open mainbar --screen=$side
fi
fi
done hyprland.conf
so every time the udev event is fired, the script checks the number of monitors that are available. since wayland is shifting IDs around when displays become unavailable, the display name is necessary to get consistent placement. |
My guess would be that eww is trying trough gtk to draw on a window or display which is not available anymore which causes the gtk function to throw an error which eww does not catch. the question would be if the monitor is restored is it still the same window / canvas or whatever which eww would try to draw on. Since I have no clue about gtk internally works this is just a guess. So the question would be what would eww need to do to not crash if the display it tries to draw on is gone and reappears sometime later |
Checklist before submitting an issue
Description of the bug
Turning off the monitor causes eww to crash.
Reproducing the issue
If eww is running and the monitor is turned off, when turned back on eww will have crashed.
From the logs:
This seems unrelated to config, I’ve removed my config and replaced it with the barebones config below and still have the issue.
Running eww 0.6.0 on openSUSE.
Config:
Expected behaviour
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: