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

Obsidian shader error on nixos 24.05 #270699

Closed
Thlr opened this issue Nov 28, 2023 · 8 comments
Closed

Obsidian shader error on nixos 24.05 #270699

Thlr opened this issue Nov 28, 2023 · 8 comments

Comments

@Thlr
Copy link

Thlr commented Nov 28, 2023

Describe the bug

Obsidian's interface is completely broken on my system after unstable's update to 24.05. Surely some package (electron?) has been updated and is no longer supported by obsidian?

Steps To Reproduce

I am installing the app using a home-manager module :

{ pkgs, ... }: { home.packages = [ pkgs.obsidian ]; }

pkgs is the nixos-unstable branch, revision 5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8.

Last revision known to me that works is e44462d6021bfe23dfb24b775cc7c390844f773d.

Expected behavior

I should have a functional UI

Logs

2023-11-28 16:48:10 Loading main app package /nix/store/4rcnmwcsabkf5d39dm6ksrm9yd2vqf12-obsidian-1.4.16/share/obsidian/obsidian.asar
2023-11-28 16:48:10 Checking for update using Github
[267007:1128/174810.463802:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
2023-11-28 16:48:10 Success.
2023-11-28 16:48:10 Latest version is 1.4.16
2023-11-28 16:48:10 App is up to date.
[267259:1128/174810.656470:ERROR:grcontext_for_gles2_interface.cc(61)] Skia shader compilation error
------------------------
// Vertex SKSL
uniform float4 sk_RTAdjust;uniform float3x3 umatrix_S1_c0;in float2 position;in half4 color;in float2 localCoord;out half4 vcolor_S0;out float2 vTransformedCoords_3_S0;void main() {// Primitive Processor QuadPerEdgeAAGeometryProcessor
vcolor_S0 = color;sk_Position = position.xy01;{
vTransformedCoords_3_S0 = (umatrix_S1_c0 * localCoord.xy1).xy;
}
}
// Fragment SKSL
half4 _dstColor;uniform half4 uDstTextureCoords_S0;uniform float3x3 umatrix_S1_c0;uniform sampler2D uDstTextureSampler_S0;
uniform sampler2D uTextureSampler_0_S1;
in half4 vcolor_S0;in float2 vTransformedCoords_3_S0;half4 TextureEffect_S1_c0_c0(half4 _input) {
return sample(uTextureSampler_0_S1, vTransformedCoords_3_S0);}

half4 MatrixEffect_S1_c0(half4 _input) {
return TextureEffect_S1_c0_c0(_input);
}

half4 DisableCoverageAsAlpha_S1(half4 _input) {
_input = MatrixEffect_S1_c0(_input);
half4 _tmp_0_inColor = _input;
return half4(_input);
}

void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
half4 outputColor_S0;outputColor_S0 = vcolor_S0;const half4 outputCoverage_S0 = half4(1);// Read color from copy of the destination
half2 _dstTexCoord = (half2(sk_FragCoord.xy) - uDstTextureCoords_S0.xy) * uDstTextureCoords_S0.zw;
_dstTexCoord.y = 1.0 - _dstTexCoord.y;
_dstColor = sample(uDstTextureSampler_S0, _dstTexCoord);
half4 output_S1;output_S1 = DisableCoverageAsAlpha_S1(outputColor_S0);{ // Xfer Processor: Custom Xfermode
if (all(lessThanEqual(outputCoverage_S0.rgb, half3(0)))) {    discard;}sk_FragColor = blend_multiply(output_S1, _dstColor);sk_FragColor = outputCoverage_S0 * sk_FragColor + (half4(1.0) - outputCoverage_S0) * _dstColor;}}
// Vertex GLSL
#version 100

precision mediump float;
precision mediump sampler2D;
uniform highp vec4 sk_RTAdjust;
uniform highp mat3 umatrix_S1_c0;
attribute highp vec2 position;
attribute mediump vec4 color;
attribute highp vec2 localCoord;
varying mediump vec4 vcolor_S0;
varying highp vec2 vTransformedCoords_3_S0;
void main() {
    vcolor_S0 = color;
    gl_Position = vec4(position, 0.0, 1.0);
    {
        vTransformedCoords_3_S0 = (umatrix_S1_c0 * vec3(localCoord, 1.0)).xy;
    }
    gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
}

// Fragment GLSL
#version 100

uniform highp vec2 u_skRTFlip;
precision mediump float;
precision mediump sampler2D;
mediump vec4 _dstColor;
uniform mediump vec4 uDstTextureCoords_S0;
uniform highp mat3 umatrix_S1_c0;
uniform sampler2D uDstTextureSampler_S0;
uniform sampler2D uTextureSampler_0_S1;
varying mediump vec4 vcolor_S0;
varying highp vec2 vTransformedCoords_3_S0;
void main() {
highp     vec4 sk_FragCoord = vec4(gl_FragCoord.x, u_skRTFlip.x + u_skRTFlip.y * gl_FragCoord.y, gl_FragCoord.z, gl_FragCoord.w);
    mediump vec4 outputColor_S0;
    outputColor_S0 = vcolor_S0;
    mediump vec2 _dstTexCoord = (sk_FragCoord.xy - uDstTextureCoords_S0.xy) * uDstTextureCoords_S0.zw;
    _dstTexCoord.y = 1.0 - _dstTexCoord.y;
    _dstColor = texture2D(uDstTextureSampler_S0, _dstTexCoord, -0.5);
    mediump vec4 output_S1;
    mediump vec4 _0_input = outputColor_S0;
    _0_input = texture2D(uTextureSampler_0_S1, vTransformedCoords_3_S0, -0.5);
    output_S1 = _0_input;
    {
        gl_FragColor = vec4(((1.0 - output_S1.w) * _dstColor.xyz + (1.0 - _dstColor.w) * output_S1.xyz) + output_S1.xyz * _dstColor.xyz, output_S1.w + (1.0 - output_S1.w) * _dstColor.w);
    }
}


Errors:
link failed but did not provide an info log
[267259:1128/174810.657790:ERROR:grcontext_for_gles2_interface.cc(61)] Skia shader compilation error
------------------------

(and then it goes on and on)

Notify maintainers

@AtilaSaraiva
@ConradMearns
@zaninime
@qbit
@kashw2

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.63, NixOS, 24.05 (Uakari), 24.05.20231124.5a09cb4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@qbit
Copy link
Contributor

qbit commented Nov 28, 2023

Does rm -rf ~/.config/obsidian/GPUCache fix it?

@Thlr
Copy link
Author

Thlr commented Nov 28, 2023

Welp unfortunately it seems I will not be able to test that.

I made my system follow nixos-23.11 - as well as home-manager's release-23.11 - to get a functional configuration again. I then reverted back to the faulty 24.05 unstable version and obsidian still launched fine.

I guess some caching issue is plausible.

@qbit
Copy link
Contributor

qbit commented Nov 28, 2023

I have to do it for every electron app.. usually once or twice per release :P - it for sure fixed it for me.

@Thlr
Copy link
Author

Thlr commented Nov 28, 2023

Good to know!

@Septias
Copy link

Septias commented Nov 29, 2023

Also fixed it for me :)

@stianlagstad
Copy link
Contributor

Similar to #244742. One of these may help:

  • Start obsidian with: obsidian --disable-gpu
  • Do rm -rf ~/.config/obsidian/GPUCache/ as suggested above

@zarelit
Copy link
Member

zarelit commented Mar 13, 2024

This is happening to Joplin as well

@SuperSandro2000
Copy link
Member

dupe of #244742

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

6 participants