Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element-desktop 1.11.35 broken due to shader compilation issues #244486

Closed
joepie91 opened this issue Jul 20, 2023 · 9 comments
Closed

element-desktop 1.11.35 broken due to shader compilation issues #244486

joepie91 opened this issue Jul 20, 2023 · 9 comments

Comments

@joepie91
Copy link
Contributor

Describe the bug

When starting element-desktop, the tray icon remains blank, and the only things that render in the window are the background color and the cursor (if the input field is active). Rebooting did not fix this. Issue seems to occur since last night's update, though I'm not certain if that's related.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install and start element-desktop
  2. Observe brokenness

Expected behavior

It should work :)

Screenshots

Starting it from a terminal yields hundreds if not thousands of copies of this error:

[62143:0720/141847.160295:ERROR:shared_context_state.cc(81)] Skia shader compilation error
------------------------
// Vertex SKSL
#extension GL_NV_shader_noperspective_interpolation: require
uniform float4 sk_RTAdjust;in float2 position;in float2 localCoord;noperspective out float2 vlocalCoord_S0;void main() {// Primitive Processor QuadPerEdgeAAGeometryProcessor
vlocalCoord_S0 = localCoord;sk_Position = position.xy01;}
// Fragment SKSL
#extension GL_NV_shader_noperspective_interpolation: require
uniform sampler2D uTextureSampler_0_S0;
noperspective in float2 vlocalCoord_S0;void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
half4 outputColor_S0 = half4(1);float2 texCoord;texCoord = vlocalCoord_S0;outputColor_S0 = (blend_modulate(sample(uTextureSampler_0_S0, texCoord), half4(1)));const half4 outputCoverage_S0 = half4(1);{ // Xfer Processor: Porter Duff
sk_FragColor = outputColor_S0 * outputCoverage_S0;}}
// Vertex GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
precision mediump float;
precision mediump sampler2D;
uniform highp vec4 sk_RTAdjust;
in highp vec2 position;
in highp vec2 localCoord;
noperspective out highp vec2 vlocalCoord_S0;
void main() {
    vlocalCoord_S0 = localCoord;
    gl_Position = vec4(position, 0.0, 1.0);
    gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
}

// Fragment GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
precision mediump float;
precision mediump sampler2D;
out mediump vec4 sk_FragColor;
uniform sampler2D uTextureSampler_0_S0;
noperspective in highp vec2 vlocalCoord_S0;
void main() {
    mediump vec4 outputColor_S0 = vec4(1.0);
    highp vec2 texCoord;
    texCoord = vlocalCoord_S0;
    outputColor_S0 = texture(uTextureSampler_0_S0, texCoord, -0.5);
    {
        sk_FragColor = outputColor_S0;
    }
}


Errors:
link failed but did not provide an info log

Additional context

n/a

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.38, NixOS, 23.05 (Stoat), 23.05.2084.08700de174b`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.13.3`
 - channels(sven): `""`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I'm running amdgpu drivers on an RX 5700XT, and my desktop environment is Plasma under (to my knowledge) X11. Issue occurs when element-desktop is installed from either stable or unstable.

@mweinelt
Copy link
Member

mweinelt commented Jul 20, 2023

1.11.35 was working before my rebuild today, so something has clearly regressed between f240619 and faa1bc7. I live on master/unstable.

I also noticed that the font size on my terminal is much smaller since the update.

I'm also on an RX 5700XT with amdgpu drivers, but on Sway.

cc @K900 for ideas

@joepie91
Copy link
Contributor Author

After talking to a few others, known workarounds so far (pick one):

Related issue: element-hq/element-desktop#1029

@mweinelt
Copy link
Member

~/.config/Element/GPUCache

config … cache … config … cache … config … cache 🤦

@mweinelt
Copy link
Member

So this must be the mesa 22.1.3 update then and pruning the now incompatible shader cache is probably the best way forward.

@schmittlauch
Copy link
Member

Logseq also suffers from this, I reported this upstream. logseq/logseq#10031
It could make sense though to escalate this to the electron level, to make that runtime handle such conditions automatically.

@jtojnar
Copy link
Contributor

jtojnar commented Aug 16, 2023

More info in #244742

@SuperSandro2000
Copy link
Member

dupe of #244742

@sjamaan
Copy link

sjamaan commented Nov 17, 2023

Note: the cache was in ~/.config/Riot/GPUCache in my case. That's probably when you have been using Element from the earlier days

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/weird-performance-drop-and-other-issues-after-updating-my-system-on-nvidia-hybrid-graphics-laptop/36318/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants