You are not logged in.

#1 2023-06-04 14:44:37

zaxdan69
Member
Registered: 2016-06-04
Posts: 318

Wayland: graphical glitches with transparency

I recently switched to wayland and I start to use labwc as WM. I first used wayland as panel, and now I'm trying to configure eww as sidebar/panel. At this time I'm using both(waybar only for system tray). The problem is that when use border-radius I have glitches on the transparent areas of both waybar and eww. Because I already tried them with wayfire and have the same issue I tent to believe that is a general wayland issue. I have an ATI RX 570  video card and I'm using the open search driver(amdgpu and mesa).
Is this a problem caused of something missing or a wayland/application bug? Any ideas?

Offline

#2 2023-06-04 15:03:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: Wayland: graphical glitches with transparency

What do you mean by "glitches"?  What's the actual problem?  Is the problem limited to the transparent areas of the rounded corners, or are other transparent areas affected?

there is no "general wayland" that could be relevant - however it's possible it could be a wlroots issue.  Though testing these bars on a QtCompositor-based compositor (e.g., plasma) would be useful, though perhaps not trivial.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-06-04 15:13:43

zaxdan69
Member
Registered: 2016-06-04
Posts: 318

Re: Wayland: graphical glitches with transparency

Yes, the problem is to the transparent areas of the rounded corners. Instead of see the background I see flickers and seems that is the color or background area of whatever window, notification message happens to pass from those areas which alternates with the screen's background and cause this flicker. I'll try them in plasma to see if happens there too.
EDIT:
Yes, happens on plasma too.
Also, when I pass the mouse cursor on those areas the cursor's print stays on those areas and those areas are full of mouse cursors which flash.

Last edited by zaxdan69 (2023-06-04 15:21:35)

Offline

#4 2023-06-04 15:21:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: Wayland: graphical glitches with transparency

It sounds like those bars are reusing their buffers and not properly clearing them between redraws.  That'd be a client bug (e.g., waybar / ewww).

EDIT: I was going to make a patch to test this, but aparently waybar used gtk for it's drawing (which is a bit ironic considering it relies on a protocol completely unsupported by gtk).  So it may take a bit to figure out how to patch it.

EDIT 2: eww also uses gtk for drawing.  Frankly using gtk window functions for drawing on a layer-shell surface seems like a horrible idea ... though it should be able to work - but I don't know anything at all about gtk's drawing functions.

Last edited by Trilby (2023-06-04 15:35:39)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-06-04 15:23:06

zaxdan69
Member
Registered: 2016-06-04
Posts: 318

Re: Wayland: graphical glitches with transparency

Yes, this seems to happen.

Offline

#6 2023-06-04 16:26:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: Wayland: graphical glitches with transparency

If you want another test to confirm, there's a tool I'm working on to create layer-shell windows (e.g., these kinds of status bars) which I was going to release and announce quite soon.  I just posted an example with rounded corners if you want to see if you get similar graphical glitches or not (and if you do I'd love to know so I can fix my tool if needed).  To try it out you'd need to install `luajit` as a dependency then the following:

curl -o laylua.tar.gz https://code.jessemcclure.org/laylua/tarball/
bsdtar xf laylua.tar.gz
make
./laylua examples/rounded-corners

This will not install anything, but just run it locally.  You can then just delete that whole directory. Note that this is just a diagnostic test as that "rounded-corners" example will not do anything remotely useful: it will just display a bar with rounded corners saying "hello world" until you click on it to close it.  But you'll be able to check whether you get similar "glitches".  If so, it could be an issue specific to your hardware / graphics drivers (which is unlikely) - if not, then it'd almost certainly be a client / gtk bug with waybar and eww.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-06-04 16:35:37

zaxdan69
Member
Registered: 2016-06-04
Posts: 318

Re: Wayland: graphical glitches with transparency

I just tried it and seems fine. So probably is waybar's/eww' s problem. I posted an issue at eww's github using info you provided. Thanks.

Offline

Board footer

Powered by FluxBB