NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

satty fails to start with Wayland protocol error on nixpkgs-unstable #359069

Open aroncommits opened 1 week ago

aroncommits commented 1 week ago

Describe the bug

satty fails to start when running on nixpkgs-unstable with the following error:

MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:763: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:794: FINISHME: support more multi-planar formats with DRM modifiers

(satty:869730): GLib-GObject-CRITICAL **: 19:05:33.707: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
Gdk-Message: 19:05:33.707: Error 71 (Protocol error) dispatching to Wayland display.

The application does not start unless the following environment variable is set:

GSK_RENDERER=ngl

This issue seems to be linked to Vulkan rendering and Wayland interaction in a hybrid GPU setup.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run satty on a Wayland compositor (e.g., Hyprland) with a hybrid GPU setup (Intel + Nvidia).
  2. Observe the application failing to start with the error message above.
  3. Set GSK_RENDERER=ngl and retry to confirm it works with this workaround.

Example command:

/nix/store/7s1riz2v0n3ifxr02b2m2kxvrkil0zb6-satty-0.14.0/bin/satty --fullscreen --filename Downloads/aron.png

Expected behavior

satty should start without requiring additional environment variables or workarounds, even on a hybrid GPU setup.

Screenshots

N/A

Additional context

  1. Vulkan drivers and GPUs detected:

    • Intel GPU: CoffeeLake-H GT2 [UHD Graphics 630] with Mesa Vulkan driver (version 24.2.6).
    • Nvidia GPU: GeForce GTX 1060 Mobile with Nvidia proprietary Vulkan driver (version 560.35.03).
  2. The issue might be related to the Intel open-source Vulkan driver. vulkaninfo logs warnings about unnecessary Vulkan ICDs:

    WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/.../libvulkan_dzn.so. Skipping this driver.
    WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/.../libvulkan_virtio.so. Skipping this driver.
  3. A similar issue was reported in [#354080](https://github.com/NixOS/nixpkgs/issues/354080), but the workaround there (uninstalling Vulkan) does not apply as vulkaninfo runs correctly in this case.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.5-zen1, NixOS, 25.05 (Warbler), 25.05.20241119.23e89b7`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"home-manager, nixos-22.11"`
 - nixpkgs: `/nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source`

Notify maintainers

@pinpox @donovanglover

KyleKrein commented 3 days ago

I have the same issue on Macbook air M1. I use this version with Vulkan drivers. The solution with the environmental variable helps.