`NIXOS_OZONE_WL=1` seemingly not having any affect?

I use the Vesktop discord client. On KDE Plasma, setting environment.sessionVariables.NIXOS_OZONE_WL = "1"; was enough to get Vesktop to use Wayland properly. However, upon switching to Hyprland, I find that Vesktop is back to flickering. This is in spite of both NIXOS_OZONE_WL=1 and ELECTRON_OZONE_PLATFORM_HINT=auto being set which, according to online sources, should be enough to prevent the flickering.
What could be going on here?

Did you ever figure this out? i’ve been able to confirm vesktop is not running in XWayland but continue to have the same issue.

I’ve been using Hyprland installed globally, and managed by home-manager. My environment.sessionVariables doesn’t seem to propagate to apps (e.g. terminal/kitty, browser/chrome, electron/discord).

Try typing echo "$NIXOS_OZONE_WL" and echo "$ELECTRON_OZONE_PLATFORM_HINT" into your terminal. If they aren’t showing, you can try also setting these into your home.sessionVariables if using home-manager, or set them from your hyprland config/uwsm env

Doing this fixed it for me:

Window 1e6147d0 -> YouTube Music:
	class: YouTube Music
	xwayland: 0
Window 1d3c1fa0 -> Vesktop:
	class: vesktop
	xwayland: 0
Window 1e581a00 -> New Tab - Google Chrome:
	class: google-chrome
	xwayland: 0
Window 1d5abd40 -> Claybar – main.cpp:
	class: jetbrains-clion
	xwayland: 0

If that doesn’t work you can try manually telling apps to use wayland (this is what I did before I got the above working):

  • For electron apps (e.g. vesktop), running with --ozone-platform-hint=wayland (run from terminal or add to launch script/desktop file).
  • For chrome, navigate to chrome://flags/, set Preferred Ozone platform / #ozone-platform-hint to wayland.

env=ELECTRON_OZONE_PLATFORM_HINT,wayland in hyprland.conf works like a charm. Unsure why I didn’t try this previously :sweat_smile: