NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.15k stars 14.18k forks source link

Graphics glitches in electron apps #332512

Open audishos opened 3 months ago

audishos commented 3 months ago

Describe the bug

Graphical glitches appearing in updated versions of electron based apps making them unusable.

Steps To Reproduce

This issue is present when a new version of an electron app is installed on my system. All of the latest versions of Discord and its forks (I primarily use Vesktop) as well as Spotify began exhibiting this behaviour when they were updated to the latest available version.

Expected behavior

Screenshots

2024-08-05T11:12:56,876806387-04:00

Additional context

I was able to get Vesktop working again by explicitly installing an older version via the following configuration in combination with the --impure flag:

let
  oldPkgs = import
    (builtins.fetchTarball {
      url = "https://github.com/NixOS/nixpkgs/archive/336eda0d07dc5e2be1f923990ad9fdb6bc8e28e3.tar.gz";
      sha256 = "sha256:0v8vnmgw7cifsp5irib1wkc0bpxzqcarlv8mdybk6dck5m7p10lr";
    })
    { };
in
{
  home.packages = with oldPkgs; [
    vesktop
  ];
}

My DE is Wayland/Sway

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.6.43, NixOS, 24.11 (Vicuna), 24.11.20240802.d049530`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"home-manager, nixos-23.05"`
 - channels(audisho): `"nixos"`
 - nixpkgs: `/nix/store/920a6ivyd50598z8djw9x3mr33gys0j5-source`

Add a :+1: reaction to issues you find important.

kira-bruneau commented 3 months ago

I'm seeing the same thing on my desktop, but not my laptop. I think it's GPU related (I have an RX 7900 XTX on my desktop):

image

I tried looking into this more before, but couldn't really narrow down what the issue was so I just pinned everything to an older version: https://github.com/kira-bruneau/nixos-config/commit/e1168bc05a3494f7196fcbe62acea291e1102b00

audishos commented 3 months ago

@kira-bruneau ty for sharing! I hadn't considered overriding the electron version, but that fixes Vesktop for me. This is a much more elegant solution and I'm able to build it using the latest Vesktop version too!

Spotify looks like it's just pulling the binary from snap so no possibility to override electron versions. This isn't as big of a deal for me though. I'll just use a 3rd party client (if only I could get QT themes working correctly :cry:) or a TUI.

Very helpful! Thanks again!

Edit: Oh and almost forgot, for tracking purposes, my GPU is an RX480