NixOS / nixpkgs

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

lmstudio: does not default to Wayland on NixOS despite NIXOS_OZONE_WL flag #352459

Open Yasso9 opened 2 weeks ago

Yasso9 commented 2 weeks ago

Describe the bug

lmstudio does not open using the Wayland backend by default on NixOS, even with the environment.sessionVariables.NIXOS_OZONE_WL = "1"; flag enabled. While other Electron-based applications like Obsidian and VS Code correctly open on Wayland, lmstudio defaults to X11 and requires manual flags (--enable-features=WaylandWindowDecorations --ozone-platform-hint=auto) to open using Wayland.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable Wayland for Electron apps on NixOS with environment.sessionVariables.NIXOS_OZONE_WL = "1";.
  2. Install and launch lmstudio.
  3. Observe that lmstudio opens with the X11 backend by default.
  4. Relaunch lmstudio with --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto to confirm it opens with Wayland.

Expected behavior

lmstudio should detect the NIXOS_OZONE_WL flag and open using the Wayland backend by default, without requiring additional command-line flags.

Additional context

This issue seems specific to lmstudio in contrast to other Electron apps like obsidian or vscode on NixOS that respect the Wayland backend configuration.

Atemu commented 2 weeks ago

The package simply doesn't have the NixOS-specific wrapping applied that makes the env var work in other packages. This is expected behaviour but support for NIXOS_OZONE_WL could be added.