Artifacts in fullscreen mode in Chrome on Wayland

When I go into a full screen mode in Chrome (mostly noticeable on videos, but reproducible on any page) I get some weird artifacts. This happens only on Wayland though and only with hardware acceleration enabled in Chrome. I have had this issue since I’ve got my new laptop Lenovo Z16 Gen 1. I have all the latest firmware installed and all OS updates installed as well.

What I noticed is that artifacts do not appear initially when entering full screen mode, but only after “To exit full screen, press and hold Esc” message disappears. Also when I am making a screenshot, the screenshot itself does not have artifacts.

One workaround I’ve found is to have some persistent notifcation (for example notify-send -u critical test) in a fullscreen mode. But as soon as I close the notification artifacts appear immediately.

What I tried to solve the issue:

  • Different versions of Chrome/Chromium/Opera/Brave: all the same, so I think this must be some common Chromium bug. All Electron apps are also affected.
  • Firefox: no issue at all there, but I don’t want to switch though
  • Disable hardware acceleration: issue goes away, but then the experience is not as good as with HW acceleration. Videos are only 30 fps in this case.
  • Disable Wayland in Chrome: issue goes away, but I then I have other issues with X11, so I prefer Wayland.
  • --disable-gpu-memory-buffer-video-frames flag’. I saw that I have error messages mentioned here, so I tried to use this flag which makes error messages to go away, but does not affect artifacts.
  • Try different power management modes in GNOME, no difference.

So as far as I can tell, the issue only affects a specific combination of environment:

  • AMD GPU: both AMD Radeon 600M Series and AMD Radeon RX6500M are affected.
  • Chromium or any derivative
  • Wayland
  • Hardware acceleration enabled
  • Full screen mode

Does anyone have the same or similar issue?

> uname -a
Linux dan-idea 6.11.1-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Sep 30 16:59:59 UTC 2024 x86_64 GNU/Linux

> cat /etc/fedora-release
Fedora release 41 (Forty One)

❯ lspci | grep -i vga

68:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev 11)

Google Chrome Version 130.0.6723.116 (Official Build) (64-bit)


1 Like

I had some similar artifacts and was able to remove them by using this kernel parameter:

amdgpu.dcdebugmask=0x10

It disables some of the power modulation functions that have been giving problems lately on some AMD gpu’s. Maybe it can help in your case as well.

1 Like

Kind of looks like what happens when running the browser’s video encoding on the wrong GPU. - Happens to me when I plug my second monitor into the motherboard, while running the browser off the dedicated GPU.

In my case, specifically telling the Browser to use my integrated GPU for hardware acceleration instead - by launching the browser with DRI_PRIME=1 - fixes it.

Unfortunately, this did not work for me :frowning: Still seeing the issue after adding this kernel param.

> cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/ostree/fedora-41a783208062c840bda247fffc527ba89d368ddd48094c1818e0d83ddfdf9f07/vmlinuz-6.11.1-300.fc41.x86_64 rd.luks.uuid=luks-3b74b6ea-d1f5-4cc9-9e82-871aa821a115 rhgb quiet root=UUID=668396ca-fe02-46d8-a4dd-85fe87c5f42d rootflags=subvol=root rw ostree=/ostree/boot.0/fedora/41a783208062c840bda247fffc527ba89d368ddd48094c1818e0d83ddfdf9f07/0 amdgpu.dcdebugmask=0x10

In my case issue appears not only for videos, but for basically any web page in a full-screen mode. I tried adding the env variable before launching chrome though, but it didn’t help :frowning:

Ah that’s unfortunate. Did you double check that the DRI_PRIME= number was correct tho? Not sure what the hardware configuration is for your system, so 1 may not be the right one.

Worth running vulkaninfo --summary and double checking that the number matches the GPU# for the device you actually want it to be run on.

Huh, in my case integrated GPU is 0. So I tried to run DRI_PRIME=0 google-chrome and the issue seems to be gone… I will try to use it this way for a while just to be sure though. Because I have previously seen this issue to be gone for some time and then come back.

Thanks for your help! I will update this thread when I can confirm that the issue is gone.

2 Likes

I’m trying the DRI_PRIME out on my Z16 Gen 1 but I’m still seeing the artifacting when fullscreen. I’m curious if this is still working for you and whether you have any additional parameters set in either chrome or the kernel that could be impacting this for me.

In my case the issue seems to be resolved and I do not fully understand why.

  1. I added amdgpu.dcdebugmask=0x10 to my cmdline but it had no effect
  2. Then I started chrome with DRI_PRIME=0 which fixed the issue
  3. I never again started chrome with DRI_PRIME=0 but I never saw the issue again

It almost feels like starting Chrome with DRI_PRIME=0 did something that fixed the issue permanently…

Update to my previous message. Just after I wrote the message, I restarted the laptop and the issue came back! Both kernel flags and DRI_PRIME are set, so it does not seem that any of these are actually fixing the issue.

Another update: the issue does not seem to happen in KDE. I rebased to Kinoite and the issue was not present there. I switched back and forth between KDE and GNOME and I had the issue on GNOME constantly, while I never saw it on KDE. I also tried Cosmic DE and I also saw issue there as well.

So whats in common between GNOME and Cosmic, but different in KDE?

Which Linux distro are you using? I don’t know of any commonalities between Cosmic and GNOME, AFAIK Cosmic uses its own compositor not mutter so that should not come into play here.

I’m on Fedora Silverblue. Possibly some GTK bug?

Just tried Sway and Weston and saw the issue there too. However for Weston it was different - artifacts did not appear in a full screen, but instead in a Chrome app (Gemini) that was running in a separate window.

I’ve added these kernel parameters and things seem to be working through a couple of reboots and quick tests. However this issue is tough to be sure since sometimes things work for awhile before the corruption starts happening.

amdgpu.dcdebugmask=0x10 amdgpu.sg_display=0

As well note I’m on Arch and there have been some updates to chrome as well as some other items in the stack that may have also impacted this issue.

The dcdebugmask specifically does the trick for me. When i remove it i immediately get artifacts on screen, re-enabling it removes them again.

I don’t use Chrome by the way, only Firefox.

I also had some success with amdgpu.dpm=0 however in that case my laptop cannot go to sleep and battery dies while the lid is closed

Interesting observation. I have an opposite one: for me amdgpu.sg_display=0 alone works. Which card do you have? I wonder if fixes are different for different cards or if it’s random.

I have an AMD Radeon 680M

[edit] this is the relevant upstream ticket for that: