NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

signal-desktop on wayland: black screen when screen sharing #251371

Closed teutat3s closed 10 months ago

teutat3s commented 1 year ago

Describe the bug

According to this upstream issue, Signal-Desktop now supports screen sharing on wayland. Using sway on nixos and the latest signal-desktop version on nixpkgs, 6.27.1, I can only share a black screen. Maybe there's a dependency missing for screen sharing to work?

Steps To Reproduce

Steps to reproduce the behavior:

  1. Start Signal-Desktop on Wayland (sway)
  2. Start a call
  3. Start screen sharing, select "share whole screen"
  4. Confirm only a black screen gets shared

Expected behavior

The whole screen should get shared.

Screenshots

Additional context

Logs:

✗ signal-desktop --use-tray-icon
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /nix/store/am1g8aw7wb45nafpc6nkz1l9mvd0qgzy-signal-desktop-6.27.1/lib/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/teutat3s/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
{"level":30,"time":"2023-08-25T13:53:04.666Z","msg":"app.ready: preferred system locales: en-US, en"}
{"level":30,"time":"2023-08-25T13:53:04.668Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-Hant"}
{"level":30,"time":"2023-08-25T13:53:04.668Z","msg":"locale: Preferred locales:  en-US, en"}
{"level":30,"time":"2023-08-25T13:53:04.670Z","msg":"locale: Matched locale: en"}
{"level":30,"time":"2023-08-25T13:53:04.703Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2023-08-25T13:53:04.705Z","msg":"app ready"}
{"level":30,"time":"2023-08-25T13:53:04.706Z","msg":"starting version 6.27.1"}
{"level":30,"time":"2023-08-25T13:53:04.706Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2023-08-25T13:53:04.709Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-08-25T13:53:04.711Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-08-25T13:53:04.712Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-08-25T13:53:04.713Z","msg":"getSystemTraySetting saw --use-tray-icon flag. Returning MinimizeToSystemTray"}
{"level":30,"time":"2023-08-25T13:53:04.713Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":1440,\"height\":840,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":true,\"titleBarStyle\":\"default\",\"titleBarOverlay\":false,\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"enablePreferredSizeMode\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":0,\"y\":0}"}
{"level":30,"time":"2023-08-25T13:53:04.748Z","msg":"spellcheck: user locales: [\"en-US\",\"en\"]"}
{"level":30,"time":"2023-08-25T13:53:04.748Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
{"level":30,"time":"2023-08-25T13:53:04.748Z","msg":"spellcheck: setting languages to: [\"en-US\",\"en\"]"}
{"level":30,"time":"2023-08-25T13:53:04.757Z","msg":"MainSQL: updateSchema:\n  Current user_version: 86;\n  Most recent db schema: 86;\n  SQLite version: 3.39.4;\n  SQLCipher version: 4.5.3 community;\n  (deprecated) schema_version: 371;\n"}
{"level":30,"time":"2023-08-25T13:53:05.308Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-08-25T13:53:06.371Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-08-25T13:53:06.379Z","msg":"System tray service: created"}
{"level":30,"time":"2023-08-25T13:53:06.380Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"}
{"level":30,"time":"2023-08-25T13:53:06.380Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-08-25T13:53:06.380Z","msg":"System tray service: enabling"}
{"level":30,"time":"2023-08-25T13:53:06.380Z","msg":"System tray service: rendering the tray"}
{"level":30,"time":"2023-08-25T13:53:06.380Z","msg":"System tray service: creating the tray"}
{"level":30,"time":"2023-08-25T13:53:06.384Z","msg":"Begin ensuring permissions"}
{"level":30,"time":"2023-08-25T13:53:06.385Z","msg":"Ensuring file permissions for 4 files"}
{"level":30,"time":"2023-08-25T13:53:06.387Z","msg":"Finish ensuring permissions in 3ms"}
{"level":30,"time":"2023-08-25T13:53:06.556Z","msg":"MainSQL: slow query getAllConversations duration=78ms"}
{"level":30,"time":"2023-08-25T13:53:07.383Z","msg":"MainSQL: slow query getAllStories duration=226ms"}
{"level":30,"time":"2023-08-25T13:53:07.959Z","msg":"Prevent display sleep service: allowing display sleep"}
{"level":30,"time":"2023-08-25T13:53:07.959Z","msg":"Background throttling enabled because no call is active"}
{"level":30,"time":"2023-08-25T13:53:08.102Z","msg":"updater/start: Updates disabled - not starting new version checks"}
{"level":30,"time":"2023-08-25T13:53:08.107Z","msg":"App loaded - time: 3403"}
{"level":30,"time":"2023-08-25T13:53:08.107Z","msg":"SQL init - time: 55"}
{"level":30,"time":"2023-08-25T13:53:08.108Z","msg":"Preload - time: 1044"}
{"level":30,"time":"2023-08-25T13:53:08.108Z","msg":"WebSocket connect - time: 1073"}
{"level":30,"time":"2023-08-25T13:53:08.108Z","msg":"Processed count: 0"}
{"level":30,"time":"2023-08-25T13:53:08.108Z","msg":"Messages per second: 0"}
{"level":30,"time":"2023-08-25T13:53:32.857Z","msg":"System tray service: showing the window from the context menu"}
{"level":30,"time":"2023-08-25T13:53:32.859Z","msg":"System tray service: rendering the tray"}
{"level":30,"time":"2023-08-25T13:53:33.046Z","msg":"main window is ready-to-show"}
{"level":30,"time":"2023-08-25T13:53:33.047Z","msg":"showing main window"}
{"level":30,"time":"2023-08-25T13:53:33.047Z","msg":"System tray service: rendering the tray"}
{"level":30,"time":"2023-08-25T13:53:33.373Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":true,\"fullscreen\":false,\"width\":708,\"height\":862,\"x\":0,\"y\":0}"}
{"level":30,"time":"2023-08-25T13:53:33.374Z","msg":"config/set: Saving ephemeral config to disk"}
{"level":30,"time":"2023-08-25T13:53:33.375Z","msg":"config/set: Saved ephemeral config to disk"}
{"level":30,"time":"2023-08-25T13:53:37.604Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":true,\"fullscreen\":false,\"width\":1440,\"height\":840,\"x\":0,\"y\":0}"}
{"level":30,"time":"2023-08-25T13:53:37.605Z","msg":"config/set: Saving ephemeral config to disk"}
{"level":30,"time":"2023-08-25T13:53:37.606Z","msg":"config/set: Saved ephemeral config to disk"}
{"level":30,"time":"2023-08-25T13:53:47.455Z","msg":"Prevent display sleep service: preventing display sleep"}
{"level":30,"time":"2023-08-25T13:53:47.455Z","msg":"Background throttling disabled because a call is active"}
{"level":30,"time":"2023-08-25T13:54:21.181Z","msg":"Approving request for permission 'notifications'"}
{"level":30,"time":"2023-08-25T13:54:21.199Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-08-25T13:54:43.065Z","msg":"Prevent display sleep service: allowing display sleep"}
{"level":30,"time":"2023-08-25T13:54:43.065Z","msg":"Background throttling enabled because no call is active"}

Notify maintainers

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.4.10, NixOS, 23.05 (Stoat), 23.05.20230823.fc94491`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.5`
 - nixpkgs: `/nix/store/6r12wzxd64dfnflzl3b7li5wpmzlmqxh-source`
gabyx commented 10 months ago

Maybe these packages help: I still have the same problem though:

xdg-desktop-portal xdg-desktop-portal-gtk (not sure if this one is needed) xdg-desktop-portal-gnome

gabyx commented 10 months ago

I see the same issue under NixOs and sway (https://github.com/gabyx/dotfiles/blob/82b9b9a5a2ab8ae2cd8cc1db4218c91469b3f36f/nixos/modules/windowing.nix)

with the following enabled. Chrome with Google Meets works so far.

 xdg.portal = {
    enable = true;
    extraPortals = [pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gtk ]
  };

Hopefully #267050 fixes this.