ogra1 / zoom-snap

75 stars 13 forks source link

Screen Share does not work on GNOME Wayland (Ubuntu 20.04) #22

Open ramboldio opened 4 years ago

ramboldio commented 4 years ago

When attempting to share screen, a Zoom-dialog pops up that says that only certain Linux versions and desktop environments are supported.

https://imgur.com/a/mbNQJfF

ogra1 commented 4 years ago

I fear that's by design ... Wayland does not allow apps to see other windows AFAIK (which is why you can not use tools like VNC with it either)

ogra1 commented 4 years ago

can you check with:

journalctl | grep DENIED

if there are any zoom related messages ?

nicolasmaia commented 4 years ago

For more context: https://superuser.com/questions/1221333/screensharing-under-wayland#1224666

ramboldio commented 4 years ago

It is working on the official Zoom .deb distribution. journalctl output is

Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/usr/lib32/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/usr/lib32/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 audit[69202]: AVC apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:454): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:455): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/usr/lib32/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:456): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:457): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:458): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/usr/lib32/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 15 00:53:44 lukas-XPS13 kernel: audit: type=1400 audit(1589496824.767:459): apparmor="DENIED" operation="open" profile="snap.zoom-client.zoom-client" name="/lib64/" pid=69202 comm="qtdiag" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mai 14 23:30:04 lukas-XPS13 kernel: audit: type=1107 audit(1589491804.829:446): pid=2581 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager/ActiveConnection/1" interface="org.freedesktop.NetworkManager.Connection.Active" member="PropertiesChanged" name=":1.12" mask="receive" pid=6223 label="snap.zoom-client.zoom-client" peer_pid=2582 peer_label="unconfined"
Mai 14 23:30:04 lukas-XPS13 audit[2581]: USER_AVC pid=2581 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager/ActiveConnection/1" interface="org.freedesktop.NetworkManager.Connection.Active" member="PropertiesChanged" name=":1.12" mask="receive" pid=6223 label="snap.zoom-client.zoom-client" peer_pid=2582 peer_label="unconfined"
Mai 15 00:24:45 lukas-XPS13 audit[2581]: USER_AVC pid=2581 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager/ActiveConnection/1" interface="org.freedesktop.NetworkManager.Connection.Active" member="PropertiesChanged" name=":1.12" mask="receive" pid=6223 label="snap.zoom-client.zoom-client" peer_pid=2582 peer_label="unconfined"
Mai 15 00:24:45 lukas-XPS13 kernel: audit: type=1107 audit(1589495085.829:452): pid=2581 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager/ActiveConnection/1" interface="org.freedesktop.NetworkManager.Connection.Active" member="PropertiesChanged" name=":1.12" mask="receive" pid=6223 label="snap.zoom-client.zoom-client" peer_pid=2582 peer_label="unconfined"
Mai 15 00:51:51 lukas-XPS13 dbus-daemon[4621]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/ScreenSaver" interface="org.freedesktop.DBus.Introspectable" member="Introspect" mask="send" name="org.freedesktop.ScreenSaver" pid=6223 label="snap.zoom-client.zoom-client" peer_pid=5163 peer_label="unconfined"

not so sure whether that is helpful..

ogra1 commented 4 years ago

the lib related messages are normal (qt loops over these dirs (which dont exist in the snap env) during startup to look for a possible nvidia driver (some distros install it in /lib64 or /usr/lib32, snapd re-maps the drivers somewhere else though))

the network manager ones look like you disconnected the network-manager-observe interface (did you ?)

and the last one is actually a bug in snapd (missing permission in the screensaver inhibit control interface)

none of this is wayland related ... it does not look like zoom even attempts to access the other windows or the wayland socket, the wayland protocol also does not allow sharing of window contents to other windows and the linked thread above indicates that you still need to apply quite hackish workarounds (piping through pipewire or other protocols) ... do you say you had it working in your current same desktop setup with the deb ?

ramboldio commented 4 years ago

Zoom had access to the network-manager-observe interface if I can trust the Snap Store UI.

on the .deb it works flawlessly. Zoom also documents that it is working with Wayland on GNOME for Ubuntu > 17.04 (maybe it includes pipewires to do this?).

The flatpak people are apparently running into similar issue: https://github.com/flathub/us.zoom.Zoom/issues/22

It seems like it is checking /etc/os-release to determine whether to show the warning. And it seems as there might be more issues to fix afterwards.

ramboldio commented 4 years ago

@ogra1 Are there good resources to get started with packaging snaps to debug stuff like that?

ogra1 commented 4 years ago

thanks for the flathub link but it seems the flatpak is just an electron wrapper for the web-client while the snap here is a full re-pack of the original zoom deb so the solutions will be different, but it gives some helpful hints ...

ogra1 commented 4 years ago

the snapcraft forum at https://forum.snapcraft.io is probably the best resource, there are also plenty of tutorials (just google for "packaging your first snap")

if you like video tutorials there is for example https://www.youtube.com/watch?v=BEp_l2oUcD8 (and a few more)

tunix commented 3 years ago

Are there any solutions to this?

ogra1 commented 3 years ago

only if zoom updates their builtin distro check that blocks this feature when /etc/os-release returns "Ubuntu Core" (which it does inside snaps)

ogra1 commented 3 years ago
$ snap run --shell zoom-client -c 'cat /etc/os-release'
Trying to use PulseAudio instead of ALSA...
NAME="Ubuntu Core"
VERSION="18"
ID=ubuntu-core
PRETTY_NAME="Ubuntu Core 18"
VERSION_ID="18"
HOME_URL="https://snapcraft.io/"
BUG_REPORT_URL="http://bugs.launchpad.net/snappy/"
$
Fuseteam commented 3 years ago

is this also the reason for no sound?

ogra1 commented 3 years ago

no, and no sound is not the scope of this issue, if you have sound problems, please open a new issue and attach

~/snap/zoom-client/current/.zoom/logs/zoom-terminal.log and ~/snap/zoom-client/current/.zoom/logs/zoom_stdout_stderr.log

Fuseteam commented 3 years ago

ah true my bad i should've commented on #28

bayazidbh commented 3 years ago

Tried to use env XDG_SESSION_TYPE=x11 on Fedora 33, but while I can open the Share Screen dialog just fine, the only option I have is Whiteboard, as well as some sound sharing on the Advanced section. There is no option to actually share my screen, app nor whole screen.

I don't think forcing it to use xWayland would even work yeah? I guess for us the only option is just running it from official deb/rpm install for screen sharing.

mikecrowe commented 3 years ago

I'm no Snap expert, but I wonder whether it would be possible to overlay the /etc/os-release file with one that the Zoom client likes using the snap "layout" feature as mentioned (briefly) in this blog posting? Something like:

layout:
  /etc/os-release:
    symlink: $SNAP/share/zoom/fake-os-release

perhaps?

edurojasr commented 3 years ago

Hi everyone

First I want to say thanks for this snap, I really love it!

Now that Ubuntu 21.04 have default to Wayland session, I'm having the same problems, where I cant share the screen. I saw in other issue that @ogra1 say that was discussing with the Zoom guys to get os-release of the snap env added to their list. maybe there have been some progress? I hope!

I really love using this snap <3

ogra1 commented 3 years ago

Hi, i tried to take a shortcut here and applied a hack in the snap that fakes the /etc/os-release file ... this version is in the edge channel now, you can switch your snap to the edge version with:

sudo snap refresh --edge zoom-client

and test if screen sharing works with this ... to switch back to the stable version you can respectively run:

sudo snap refresh --stable zoom-client

feedback would be really appreciated ;)

edurojasr commented 3 years ago

Hi @ogra1

I did the refresh --edge zoom-client still in Version: 5.6.4 (16888.0424) and I can't share screen :( I'm on Ubuntu 21.04.

I did a remove --purge of the zoom-client then fresh install the --edge channel.

image

Same message when try to start screen share.

:(

*edit: update the test with the edge channel

ogra1 commented 3 years ago

Can you try again with revision 146 from the edge channel ? i believe at least the popup message should be gone now ... (i see it reporting the correct os-release info in ~/snap/zoom-client/current/.zoom/logs/zoom_stdout_stderr.log for the OS: parameter here)

$ grep OS: ~/snap/zoom-client/current/.zoom/logs/zoom_stdout_stderr.log
[CZPClientLogMgr::LogClientEnvironment] [MacAddr: AC:22:0B:BF:EB:33][client: Linux][OS:  Ubuntu 20.04.2 LTS x64][Hardware: CPU Core:6 Frenquency:4 G Memory size:32024MB CPU Brand:Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz GPU Brand:][Req ID: ]

(there might be more needed for wayland sharing, but this os-release test should be the first hurdle to take)

ogra1 commented 3 years ago

I'm no Snap expert, but I wonder whether it would be possible to overlay the /etc/os-release file with one that the Zoom client likes using the snap "layout" feature as mentioned (briefly) in this blog posting? Something like:

layout:
  /etc/os-release:
    symlink: $SNAP/share/zoom/fake-os-release

perhaps?

sadly /etc/os-release is one of the few files that are excluded from being used in layouts (along with everything in /proc, /sys and /dev)

edurojasr commented 3 years ago

So I did the test with 146.

image

image

popup message its gone, and now it seems that it works the sharing at least portions of the screen. It's a limited sharing, but I guess it's the right direction. As you @ogra1 say might be more needed for wayland sharing. but at least the snap do not get blocked by the os-release. Thats good :)

ogra1 commented 3 years ago

YAY !! so we passed the first hurdle, the other bits are likely just adding the correct wayland libs to the snap, i'll try to find some time to dig into that tomorrow ...

edurojasr commented 3 years ago

That's great!

Thanks for your time! let me know if I can help with something, I'll be waiting to do the tests at least :)

ogra1 commented 3 years ago

So with revision 147 in the edge channel it should now be possible to share your whole desktop (apparently there is no way to share single windows in Zooms Wayland implementation) after you connected the screencast-legacy interface with:

sudo snap connect zoom-client:screencast-legacy

you should get a "desktop 1" or so that you can select in the above dialog next to the "whiteboard" ... i have not done any end-to-end tests but from a local perspective everything looks like it should be working.

edurojasr commented 3 years ago

Tested 147 with the sudo snap connect zoom-client:screencast-legacy with a call and meeting

image

It work, but there are some problems.

it's strange that Zoom Wayland Implementation can only share the entire screen, other apps like Discord or even Firefox and Chromium only allow you to share app windows and not the full screen.

May I suggest? that if from now on the users should use sudo snap connect to enable certain functionalities, you can do like the Discod snap front page Discord store page they explain how to do it there.

hjwp commented 3 years ago

Not sure if this is of any use, but fwiw, on 21.04 the default install did not have screen-sharing out of the box, but upgrading with

sudo snap refresh --edge zoom-client
sudo snap connect zoom-client:screencast-legacy

gives me working screensharing for 1 screen :grin:

incidentally when i first installed the default version from the ubuntu snap store, I tried running the snap connect screencast-legacy command as suggested in the docs / description in the snap store, but it gave an error.

edurojasr commented 3 years ago

hi @hjwp Yeah that's because the stable, candidate and beta channels are still in 143.

image

For now only in the edge channel screen share works after using snap connect screencast-legacy

hjwp commented 3 years ago

would it be worth updating the docs/snap store description?

khatchad commented 2 years ago

hi @hjwp Yeah that's because the stable, candidate and beta channels are still in 143.

image

For now only in the edge channel screen share works after using snap connect screencast-legacy

Hm, I am still not seeing a non-empty screen share option dialog.

halbow commented 2 years ago

Hello All :wave:

Thanks for the work on this snap ! :slightly_smiling_face:

On a new install of ubuntu 21.04, I cannot share screen, even after running these two commands,

sudo snap refresh --edge zoom-client
sudo snap connect zoom-client:screencast-legacy

I'm seeing this when launching zoom from the CLI, not sure if it can have an impact ?

Testing for explicit PulseAudio choice...
...and PulseAudio has been explicitly chosen, so using it.