Dunst: Flicker with --replace

Created on 29 Apr 2017  路  16Comments  路  Source: dunst-project/dunst

In a bash shell, run:

r=0; while true ; do r=$(dunstify --replace=$r --printid "Hi $r - $RANDOM") ; sleep 1 ; done

Very often there is a visible flicker when the notification is replaced.

Would it be possible to eliminate it?

Bug

All 16 comments

Absolutely no flicker here. What WM are you using?

i3-gaps. Can still see the flicker both on my desktop and laptop, with or without compositing (Compton).

I can verify this. Using i3 with compton.

Same here, i3, different kind of flickering with or without compton. It happens with the volume notification from clementine, if you scroll the volume up/down fast enough. The flickering is slightly different with and without compton (I think..)
. With compton, sometimes the notification completely disappears until I move it to my other monitor. I never bothered reporting it because I have no idea where to start investigating this. :S

EDIT: just to clarify, for me it is also reproducible with @CyberShadow's dunstify reproducer (again both with and without compton).

I can reproduce the flicker with the above script. i3-gaps no compton.

Odd, I can't reproduce this on i3wm, neither with nvidia nor intel (just in case video card made any difference).

Can you quickly try with i3wm just to narrow down if it's i3-gaps-specific or not?

I have an amd video card using the opensource drivers.

I can confirm that it also happens on i3wm with compton enabled, strangely enough it happens much less frequently if at all without compton.

I have bspwm with compton enabled and the graphic card is intel, and I got the flicker too

The notifications of the rhythmbox music player flicker as well ( i also use i3 gaps with compton).
After running dunst with -print i noticed that rhythmbox tries to print its notification multiple times for some reason, so i guess dunst flickers on i3/compton when it refreshes an already existing notification.

Setting glx-use-copysubbuffermesa to true fixed the compton flicker for me (only flickers slightly if I spam it like a maniac).

@josduj Thank you for the solution, but there are still two problems.

  1. If someone use the xrender backend
  2. If someone use dunst to display a notification everytime the volume, brightness, etc., is increased or decreased. Or just something that needs high refresh, an that means spam like a maniac

Have the same issue, i3-gaps with compton.

I guess, I've got the issue:

  1. notification.c:431

    • The previous notification will get closed

  2. notification.c:574

    • It will get removed from the displayed queue

  3. notification.c:596

    • wake_up() will get called

  4. dunst.c:239

    • wich triggers the x window to hide

  5. notification.c:519

    • bu until this point the notification queue is empty

So there is a full x_win_show and x_win_hide call in between replacing the notification. I'm not that experienced with X, but I'd guess this is the problem.

If some of you could verify, that the fix proposed in #391 works, would be great.

@bebehei Yes, it works for me! Can't speak about the patch but it does completely remove the flicker, both in the repro command above and my real use-case (showing current volume when adjusting it).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick-motard picture patrick-motard  路  6Comments

progandy picture progandy  路  6Comments

knopwob picture knopwob  路  5Comments

wpovell picture wpovell  路  5Comments

existme picture existme  路  4Comments