hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.47k stars 898 forks source link

Screen gets permanently dimmed after desktop notification from aerc #3855

Open Schweber opened 11 months ago

Schweber commented 11 months ago

Hyprland Version

Hyprland, built from branch at commit v0.31.0 (). Tag: flags: (if any) debug

Bug or Regression?

Bug

Description

Sometimes, the whole sceen gets permanently dimmed by about 30% and stays that way until hyprland is restarted after a desktop notification is shown. However, i can't reproduce that, it just happens from time to time and i haven't found a pattern so far.

I'm using mako and even if i spam notifications with notify-send in a script, i can't force the dimming to occur but i have observed it "in the wild" several times and it's annoying, because i have to restart hyprland.

I know that this gives you little to go on but maybe you've got an idea where this might come from. I suppose that dim_around is invoked erroneously sometimes and kept on.

How to reproduce

Have a desktop notification shown with libnotify (and bad luck or an unknown further condition)

Crash reports, logs, images, videos

No response

vaxerski commented 11 months ago

ignoring your wildly out of date version, mako cannot have a dimaround rule. Are you sure it's not just some window you config'd to have this? Does this happen with the default config?

Schweber commented 11 months ago

I had no dim_around rule in my config at all. Yesterday i added dim_around = 0 as an attempt to diagnose this problem, as i noticed that the default value is 0.4.

I will keep an eye on this issue and reduce my window rules. nixpkgs updated hyprland to 0.32 yesterday so maybe this helps.

However, i only noticed this behaviour with desktop notifications and not with regular windows.

Schweber commented 11 months ago

It just happened again. I had reduced my windowrules and commented out dim_around = 0 to see if it still occurs and it did (i'm on hyprland 0.32 meanwhile).

My only active window rules are:

windowrulev2 = float,class:^(pcmanfm-qt)$,title:^(.*)(file|File|Choose|Preferences)(.*)$
windowrulev2 = nomaximizerequest,class:^(libreoffice)(.*)$
windowrulev2 = fullscreen,class:^(mpv|endless-sky)$
windowrulev2 = idleinhibit fullscreen,class:^(mpv|librewolf)$
windowrulev2 = bordercolor rgb(FF0000),xwayland:1
Schweber commented 11 months ago

Ok, it just occured again with dim_around = 0 uncommented. So this doesn't solve it.

Schweber commented 11 months ago

I changed to hyprctl notify to see if this solves the problem but it also occurs with hyprctl notify. However, i only observe the occasional dimming with notifications from aerc. And this time the dimming went away after i brought aerc to my active workspace and focused it (i have it in a special workspace when not in use).

In my aerc.conf i have

[hooks]
#
# Hooks are triggered whenever the associated event occurs.

#
# Executed when a new email arrives in the selected folder
mail-received=hyprctl notify 1 10000 0 "$AERC_FROM_NAME  - " "$AERC_SUBJECT"
# mail-received=notify-send --urgency=low "$AERC_FROM_NAME" "$AERC_SUBJECT"

Why is this happening?

vaxerski commented 11 months ago

sounds like a misbehaving xwayland app

Schweber commented 11 months ago

But aerc runs in kitty terminal and according to hyprctl clients kitty is no running under xwayland.

Also it just occured that the screen got dimmed after a notification, bringing aerc to the present workspace didn't change it but after the next notification the dimming was gone.

Schweber commented 11 months ago

To expand on this: the screen also gets dimmed when just a new message arrives without a notification. I'm using aerc in conjunction with vdirsyncer and goimapnotify (all notifications disabled to for testing, dimming still occurs).

mpldr commented 10 months ago

Hi, one of the aerc Maintainers here o/

We do nothing more than invoke the provided command and since aerc's running in a tty, the xwayland is at the very least not us :)

Schweber commented 10 months ago

Hi, one of the aerc Maintainers here o/

We do nothing more than invoke the provided command and since aerc's running in a tty, the xwayland is at the very least not us :)

Thanks for your input! So i guess the problem lies with hyprland, maybe someone can figure out where this problem comes from.

(I opened this issue on aerc sourcehut if it should become relevant).