Distorted window drop shadow after 1.84.128

Description of the issue:

The drop shadow of the browser window is distorted and distracting due to constantly changing when the window contents changes.

Attached are screenshots of the last known working version and the first broken.

How can this issue be reproduced?

  1. Launch brave and observe the window drop shadow.

Expected result:

A clean drop shadow without artifacts and variations.

Brave Version( check About Brave):

I’ve tried different versions and concluded that 1.84.128 works as expected while 1.84.129 and later does not.

Additional Information:

Ubuntu 24.04.3 LTS with Intel graphics and wayland display server.

Do you see this same shadow when using other browsers? Additionally, is this issue present in the latest build of the browser? You’re several updates behind – latest build at this time is v1.85.118

Unable to reproduce in a VM on the latest Brave (but also this isn’t Ubuntu LTS either).

Isn’t the shadows handled by Wayland itself? (Though, the user did say an older version of Brave doesn’t have the issue, so yea, I want to see the latest like my screenshot doing the same thing, because I don’t think it should be browser specific, but if that’s the case, there could be something weird going on there.)

Yeah I tested on my Ubuntu VM and also don’t see the shadow. And yes, I had also assumed that this would be handled by the system rather than the browser so unclear why it’s not occurring across browser versions.

Interested to see if the issue persists in the latest browser build.

Thanks for looking into my issue.

All tests I’ve done and shown here are with the same system without any packages upgraded in between. The system was fully upgraded when I filed this report.

I’ve now tried the latest release v1.85.118 and also nightly v1.87.131 with the same result.

I have not seen this issue with any other software, I tried installing Chromium and Firefox from Ubuntu official repositories, both work as expected without artifacts.

Please let me know if there is anything else I should try or any information that is missing.

Screenshots attached.

So I did notice something that I didn’t do that you were doing in your screenshots. I thought perhaps I tested this wrong, as I had Brave on top of a non-Brave window, but you have a Brave window on top of a Brave window. Thinking maybe this was the issue, I retested in a VM, but still could not reproduce.

Does anyone here have a laptop with a similar Intel CPU/iGPU also running Ubuntu and can test? I’m still not sure how or why it’s Brave version specific as this seems like a Wayland/driver compositor issue, but I’ve seen stranger stuff on Linux before.

I think we need to test this exact environment. I have one ThinkPad W541 here with an Intel Haswell CPU and iGPU, but I doubt it’ll be the same pipeline as yours and wouldn’t be a fair Apple’s to Apple’s test (and I think we need a true Apple’s to Apple’s test).

For now, since Brave on *nix has two different ends it can use, GTK or QT, let’s play with this toggle and see if the behavior changes at all. It’s not intended to be a fix or workaround, but more of a “where might the root cause lie”.

I see from your screenshots, your browser corners are not very rounded. That means you aren’t using GTK, you are using the “Classic” theme. Go here:
brave://settings/appearance

If you see “Use GTK”, click that (Use QT will be mostly useless under Ubuntu which is Gnome, GTK based, unless you have KDE also installed with Qt components, but GTK is native to Ubuntu/Gnome).

If successful, theme should change from “Classic” to “GTK”, and the window corners become far more rounded like other apps:

Does the shadow behavior change for you? On my VM (which sadly is software composited, which I think is why we cannot reproduce it on VM’s), I noticed the shadow drawing routine appears to change as the shadow itself does change shape and depth.

(If this does fix it, then something changed in the “Classic” theme I guess, because I do see you were using Classic the whole time even when it did work. So it’s theme specific, but only if it fixes it.)

Thanks for your continued effort.

I can confirm that the shadow is broken over the desktop background as well as another native Gnome application.

Changing theme from Classic to GTK indeed changes the shadow rendering. The shadow doesn’t look that much like the one on the native Gnome applications but it does seem to be rendered correctly :slightly_smiling_face:

I don’t think I ever changed the theme manually, my guess is classic is or was the default when I initially started using brave on this system. My Ubuntu 24.04 system is a clean install done in September of 2024.

Switching to QT theme brings back the broken shadow.

Yea, selecting QT if you have no actual QT components will default actually back to Classic (hence it returned, the Theme likely says Classic and not QT even though you clicked QT).

So it seems it’s the Classic theme that’s broken, but not the GTK one. Ironically in a VM we can’t reproduce the broken classic theme, so that’s quite interesting.

I’m glad that the GTK theme does at least fix it even if the shadow is slightly different. I will say, Brave does actually still seem to default installing with the Classic theme as the default when I installed on my VM’s.

At least this now narrows down where the issue is, the theme itself. I think it might be Wayland/Intel GPU specific though, one of those weird use-cases which explains why in a VM we can’t reproduce it (no real OpenGL/Vulkan acceleration present, just software rendered compositing).

Would you like me to boot a copy of my system in a virtual machine to see if the issue persists?

Yea, if you can, one without any GPU acceleration of any kind (I tested in VirtualBox specifically using the VBoxSVGA “Graphics Controller” option.)

If it works in the VM, it’s something odd between Wayland, the GPU and Brave. Especially since you already verified that Chromium itself has no issues, so this really does make me think it’s something about the Classic theme in Brave itself. Could be something as silly as a mis-aligned texture for all I know and how one GPU handles it vs another.

I’ve been putting some time into trying to replicate the issue within VirtualBox but it works just as expected regardless of theme. It’s not a perfect clone of my system due to issues with booting the ZFS filesystem within VirtualBox but I think it was close enough.

I didn’t have any issues regardless of VMSVGA with 3D acceleration or VBoxSVGA without.

I do still think it’s a bit weird that the issue I’m seeing with Intel iGPU was introduced with a specific Brave version and that I don’t have any known graphical issues otherwise. I’m even running Rhinoceros 3D modeler with acceleration in VMware without any issues.

Is there anything else I can do to try to track down what change broke the shadow?

From your end, not likely. Anything could have changed, and it would need to be someone like @Mattches that needs to push for that.

It could be any number of things:

  1. Brave doing something weird around the edges (not likely though, because other GPU’s don’t show it)
  2. Wayland issues (you’d need to run X of your choosing, on your same GPU and driver to truly see if it’s Wayland doing it, and I’d consider that a bit more work than you should need to go through to test)
  3. Driver issues, because we know the GPU is physically healthy or things would be way more obviously worse, so this really only points to 1 of 3 things, Brave, Wayland or GPU.

To be honest I’m more keen on saying it’s a Wayland issue, and simply how it’s handling the classic theme with it’s compositor. Wayland is the reason I VM’d Linux after using Linux as a host for 2 decades. If I left Linux and Wayland to run to Windows, there was a reason, in no way was I going to deal with what I at best, call “beta quality” stuff, and Wayland is in no way what I call ready for retail yet. But the push to replace X was so fast and abrupt, apps, even Wayland itself was never fully ready despite how much they claim it was and still is.

My money is also on Wayland here. Either way, to confirm @girrr switching to GTK theme resolves the shadow/artifact issue for you?

I would think Wayland since it seems to be a common with many issues. However when testing with X11 instead of Wayland to prove this I got the same issue.

Using the GTK theme does indeed render a correct shadow on both X11 and Wayland.

Just as a side note I’m not that keen either on the forced push to Wayland which I agree seems to have a lot of bugs and missing features when compared to X11/Xorg.

Yea, though in this case you proved something is happening outside of Wayland. Being it doesn’t happen in VM’s, I might just point and say it’s the GPU driver itself. I doubt the GPU itself is faulty, this seems like one of those driver regressions.

I’m actually glad you did test with X11 as well, as it now proves it’s not Wayland’s compositor doing it.

I guess someone at Brave should look into this combination of Intel GPU on Linux, under both X11/Wayland and specifically the classic theme (since that is the default it ships with).