Zoom-us Wayland Screen Sharing Fix?

Hi, folks!

I am one of those wretched creatures compelled to use Zoom for work :melting_face:

To add insult to injury, it seems recent versions of Zoom break screen sharing under Wayland.

You can read more about this problem in this nixpkgs GitHub issue.

In the issue thread, it seems gvolpe was able to hack together a solution by downgrading to a specific version of Zoom. This apparently also required overriding this Zoomā€™s pipewire dependency to an earlier version as well.

His nixconfig is public, but itā€™s rather complex, with the relevant code spread across multiple files. Iā€™d rather not try to mirror his solution exactly as it would add (what is for me at the moment) unnecessary complexity to my own configuration (plus, my puny brain canā€™t quite parse all that is going on there).

Iā€™m instead looking for some guidance on how accomplish what gvolpe achieved within a single nix file that can be imported by home-manager. It did not seem appropriate to pollute the GitHub issue with such a request which is why Iā€™m pestering people in this forum :innocent:

My hope is that, if we come to some solution, this could be a nice drop-in fix for others in the same boat.

Here was my first attempt:

{
  config,
  lib,
  pkgs,
  inputs,
  ...
}: let
  # Last Zoom version with working Wayland screen sharing
  zoomVersion = "6.0.2.4680";

  # This is nixpkgs 24.05 from the flake input which has the required pipewire v1.0.7 for older Zoom
  stablePkgs = inputs.nixpkgs-stable.legacyPackages.${pkgs.system};

  zoom-us-custom = (pkgs.zoom-us.override {pipewire = stablePkgs.pipewire;}).overrideAttrs (oldAttrs: rec {
    version = zoomVersion;
    src = pkgs.fetchurl {
      url = "https://zoom.us/client/${version}/zoom_x86_64.pkg.tar.xz";
      hash = "sha256-027oAblhH8EJWRXKIEs9upNvjsSFkA0wxK1t8m8nwj8=";
    };
  });
in {
  home.packages = [
    zoom-us-custom
  ];

  # Without disabling xwayland, fonts are pixelated and look like šŸ’©
  xdg.configFile."zoomus.conf" = {
    text = ''
      [General]
      xwayland=false
      enableWaylandShare=true
    '';
  };
}

Sadly, this didnā€™t work as Zoom crashes after signing in.
Commenting out the xdg.configFile section prevents the crashing, but the fonts look like junk under xwayland as the comment says. More importantly, screen sharing still doesnā€™t work :crying_cat_face:
When I click 'Share Screen" I can then select either ā€œuse system desktop captureā€ or ā€œuse system window capture,ā€ but nothing happens after choosing either one.

Any help would be most appreciated.
Thanks, everyone!

1 Like

Sorry - accidentally deleted last post.

I assume youā€™re using flakes, judging by the inputs in your code. I got it working by doing this:

  1. Grab the last nixpkgs hash with a working zoom:
inputs.nixpkgs-zoom.url = "github:NixOS/nixpkgs/06031e8a5d9d5293c725a50acf01242193635022";
  1. Since youā€™re passing in inputs to your home-manager configuration, you can do something simple like so:
{
  config,
  pkgs,
  inputs,
  ...
}:

let
  zoomPkgs = import inputs.nixpkgs-zoom {
    system = "x86_64-linux";
    config.allowUnfree = true;
  };
in
{
  home.packages = with pkgs; [
    zoomPkgs.zoom-us
  ];
}

That should be one minimal way to get it up and running. You can of course do a lot of clean up on it (eg. passing in the zoomPkgs in directly into your home-manager module).

Notably - I didnā€™t have to make any changes to pipewire.

1 Like

Thanks, aos!

After doing a rebuild/switch with the suggested change Iā€™m afraid screen sharing behaves as before: Iā€™m shown window vs desktop sharing options, but, once selected, nothing happens.
(note too the pixelated fonts as I assume this is defaulting to xwayland. This version of Zoom doesnā€™t seem to like the xwayland and enableWaylandShare options in the config and cause the home-manager service to fail on rebuild unless removed.)

Iā€™m wondering if I might be missing something necessary in my overall config that you may have defined elsewhere. Perhaps in my compositor (Hyprland) config? Environment variables? As an example, in my hyprland config I have stuff like:

....
  home = {
    packages = with pkgs; [
      hyprpicker
      wdisplays
      wev
      wl-clipboard-rs
      lockscreen
      screenshot
      volume
      xdg-desktop-portal-hyprland
    ];

    sessionVariables = {
      MOZ_ENABLE_WAYLAND = 1;
      QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
      WLR_NO_HARDWARE_CURSORS = 1;
      CLUTTER_BACKEND = "wayland";
      XDG_SESSION_TYPE = "wayland";
      XDG_CURRENT_DESKTOP = "Hyprland";
      XDG_SESSION_DESKTOP = "Hyprland";
      WLR_BACKEND = "gl"; # No GPU :'(
      QT_QPA_PLATFORM = "wayland";
      GDK_BACKEND = "wayland";
      NIXOS_OZONE_WL = 1;
      ELECTRON_OZONE_PLATFORM_HINT = "auto";
    };
  };

  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal-hyprland
    ];
    config.common.default = "*";
  };

  wayland.windowManager.hyprland = {
    enable = true;
    systemd.enable = true; # TODO

    settings = {
      exec-once = [
        "swww-daemon"
        "swww img ~/.local/share/bg/wallpaper.jpg"
        "nm-applet --indicator"
        "waybar"
        "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
        "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
      ];
...

Granted, many of those things are done out of ā€˜superstitionā€™ as Iā€™ve thrown things together based on various forum posts, github repos, and the command of my AI overlords.

Also, If it matters, I can confirm that the pipewire, pipeware-pulse, and xdg-desktop-portal-hyprland services are running.

I do appreciate the help and Iā€™m sure hammering this out will be useful to other drones like me whose jobs require them to use unfree malware Zoom :wink:

Iā€™m also running Hyprland. I do also have xdg-desktop-portal-gtk under extraPortals, but Iā€™m not sure thatā€™s needed. My config looks pretty similar to yours, here is the userland part: nix-config/modules/nixos/userland.nix at 627765622f6e57af944de4b926bfc22dac61518d Ā· aos/nix-config Ā· GitHub

Maybe the only difference is that my Hyprland is the nixosModule, vs. yours being the home-manager module. But I donā€™t think that should make a big difference.

It seems like your issue is the pop-up window selector for what to share doesnā€™t come up at all.

I wouldnā€™t mind a ping, happy to help :slight_smile:

Your first attempt looks good to me, Iā€™ve only got two suggestions:

  • Make sure the stablePkgs instance is pinned to the exact revision I have, to at least discard this difference.
  • Remove the zoomus.conf settings, let the zoom client modify that file as it pleases, and you can also edit it manually to fix those pixel issues.

A few more relevant things I have on that file that are not committed to the repo:

enableWaylandShare=false
xwayland=true

Hope that helps! Iā€™ve been using it without issues on Hyprland since that downgrade, hopefully the Zoom folks get their s**t together and fix the client on Wayland once and for all :smirk:

Gnome user here. Just wanted to confirm that following some of the steps above and using nix-versions I was able to bring back screen sharing using the following config details. I didnā€™t need any zoomus.conf entries.

{ config, pkgs, ... }:
let
  pinnedZoomPkgs = import (builtins.fetchTarball {
      url = "https://github.com/NixOS/nixpkgs/archive/0c19708cf035f50d28eb4b2b8e7a79d4dc52f6bb.tar.gz";
      sha256 = "0ngw2shvl24swam5pzhcs9hvbwrgzsbcdlhpvzqc7nfk8lc28sp3";
  }) {
    system = "x86_64-linux";
    config.allowUnfree = true;
  };

  pinnedZoom = pinnedZoomPkgs.zoom-us;
in
{
  environment.systemPackages = [ pinnedZoom ];
}