zed icon indicating copy to clipboard operation
zed copied to clipboard

Discoloration of GPUI surfaces when using wayland backend.

Open tropicaaal opened this issue 7 months ago • 5 comments

Summary

This recently started happening to me out of the blue. I'm not sure of the cause, although I did install a Mesa driver update recently. That could very likely be a coincidence though, because this seems to be specific to GPUI apps which is why I'm filing a bug report here.

zed (Wayland Backend) WAYLAND_DISPLAY="" zed (X11 Backend)
Image Image

Notice how the wayland instance of the application has slightly greener colors. The rendered colors don't match the one in my theme.

Image

Steps to trigger the problem:

  1. Launch zed on linux using the wayland backend.

Actual Behavior: Colors appear to be slightly lower hue, higher saturation, and lower brightness. Expected Behavior: Colors should be rendered as specified in the theme.

Zed.log

Zed Version and System Specs

Zed: v0.180.4 (Zed) OS: Linux Wayland fedora 43 (rawhide) Memory: 15 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV RENOIR) || radv || Mesa 25.0.2

tropicaaal avatar Apr 08 '25 17:04 tropicaaal

Since I am on Fedora Rawhide (and that's an obviously less-than-stable system configuration), I'll see what I can do to repro this on stable Fedora as well. I'm mostly curious if others are experiencing this.

tropicaaal avatar Apr 08 '25 17:04 tropicaaal

@Tropix126 Any updates on this? Did you solve it somehow? I think i might be experiencing the same bug.

Left zed is started with X11 and right is Wayland ( And the X11 has the correct colors while Wayland is weird looking and all too saturated)

Image

roufpup avatar May 26 '25 01:05 roufpup

@Tropix126 Any updates on this? Did you solve it somehow? I think i might be experiencing the same bug.

I haven't made any leads on the cause of this yet sorry :( What I did discover is that a stock F41 installation didn't have this issue (I booted a LiveUSB session and installed zed), so it could be the result of a bug/regression in some external package (my initial thought was Mesa, but it's been through months of updates and still no dice). The only thing that makes me think otherwise is the fact that this only affects zed for me. Could be a weird combination of both, where an external package had a regression and zed's windowing library is doing something weird with the wayland protocol that it shouldn't.

tropicaaal avatar May 26 '25 14:05 tropicaaal

@Tropix126 When you have the discoloration what WM or DE do you use? Because for me i use hyprland and i think that has been the issue at least for me. Because running Zed on gnome and it is a wayland window seems to be working fine.

roufpup avatar May 26 '25 17:05 roufpup

@Tropix126 When you have the discoloration what WM or DE do you use? Because for me i use hyprland and i think that has been the issue at least for me. Because running Zed on gnome and it is a wayland window seems to be working fine.

GNOME (48.1) wayland

tropicaaal avatar May 26 '25 19:05 tropicaaal

So:

  • @Tropix126 you are seeing this under fedora 43 and not fedora 41 (both wayland with GNOME). What video cards(s) do you have?
  • @roufpup you are seeing this under wayland with hyperland? Can you paste your zed details ('zed: copy system specs to clipboard' from the command palette)? What video cards do you have?

I'm working on a linux many-distro setup; I only have older Nvidia and Intel graphics at the moment, but will have some newer AMD hardware arriving shortly.

notpeter avatar Jun 24 '25 16:06 notpeter

So:

  • @Tropix126 you are seeing this under fedora 43 and not fedora 41 (both wayland with GNOME). What video cards(s) do you have?

iGPU on a mobilie Ryzen 7 5700U. Here's the relevant lspci entry.

04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne (rev c1) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device 3f96
	Flags: bus master, fast devsel, latency 0, IRQ 41, IOMMU group 6
	Memory at 460000000 (64-bit, prefetchable) [size=256M]
	Memory at 470000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 1000 [size=256]
	Memory at fd400000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.63, 6.15.0-0.rc5.42.fc43.x86_64) (0x164c)
    Version: 25.1.0
    Accelerated: yes
    Video memory: 512MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 19 MB, largest block: 19 MB
    VBO free aux. memory - total: 6422 MB, largest block: 6422 MB
    Texture free memory - total: 19 MB, largest block: 19 MB
    Texture free aux. memory - total: 6422 MB, largest block: 6422 MB
    Renderbuffer free memory - total: 19 MB, largest block: 19 MB
    Renderbuffer free aux. memory - total: 6422 MB, largest block: 6422 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 512 MB
    Total available memory: 8180 MB
    Currently available dedicated video memory: 19 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.63, 6.15.0-0.rc5.42.fc43.x86_64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.1.0-rc2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.1.0-rc2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.1.0-rc2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

tropicaaal avatar Jun 24 '25 19:06 tropicaaal

This strangely seems to have fixed itself for me. Not sure if anything changed in GPUI or a driver got fixed, but colors now render fine on my system. I'm going to close this for now, but if the issue is still a problem for others I'd be happy to give more information or reopen.

tropicaaal avatar Oct 19 '25 06:10 tropicaaal