After updating to Ubuntu 24.04 LTS from 22.04 I can no longer share my screen in chrome or firefox.
Im using Gnome (Wayland). It works on X11, but I cant use X11 due to other issues.
I have tried everything mentioned here: Screen sharing with Wayland
If I run chrome in a Terminal and select screen sharing, these errors show up in the terminal:
[25628:25628:0905/162847.590258:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
[25628:25628:0905/162847.719072:ERROR:screen_capture_portal_interface.cc(48)] Failed to request session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
Even though ScreenCast shows up in d-feet:
screenshot
Troubleshooting info:
Firefox 130.0 (snap)
Chromium 128.0.6613.84 (snap)
Also tried normal Chrome (non-snap)
Pipewire:
$ systemctl --user status pipewire.socket pipewire
● pipewire.socket - PipeWire Multimedia System Sockets [...]
Active: active (running)
● pipewire.service - PipeWire Multimedia Service [...]
Active: active (running)
$ pipewire --version
pipewire
Compiled with libpipewire 1.0.5
Linked with libpipewire 1.0.5
Wireplumber:
$ systemctl --user status wireplumber
● wireplumber.service - Multimedia Service Session Manager [...]
Active: active (running)
$ wireplumber --version
wireplumber
Compiled with libwireplumber 0.4.17
Linked with libwireplumber 0.4.17
xdg-desktop-portal:
$ systemctl --user status xdg-desktop-portal
● xdg-desktop-portal.service - Portal service [...]
Active: active (running)
$ systemctl --user status xdg-desktop-portal-gnome
● xdg-desktop-portal-gnome.service - Portal service (GNOME implementation) [...]
Active: active (running)
$ apt search xdg-desktop-portal | grep "installed"
libportal-gtk3-1/noble,now 0.7.1-5build5 amd64 [installed,automatic]
libportal-gtk4-1/noble,now 0.7.1-5build5 amd64 [installed,automatic]
libportal1/noble,now 0.7.1-5build5 amd64 [installed,automatic]
xdg-desktop-portal/noble,now 1.18.3-1ubuntu1 amd64 [installed,automatic]
xdg-desktop-portal-gnome/noble,now 46.0-1build1 amd64 [installed]
xdg-desktop-portal-gtk/noble,now 1.15.1-1build2 amd64 [installed,automatic]
xdg-desktop-portal-kde/noble,now 5.27.11-0ubuntu3 amd64 [installed,automatic]
Wayland stuff:
$ env | grep '^WAYLAND_DISPLAY='
WAYLAND_DISPLAY=wayland-0
$ < "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^WAYLAND_DISPLAY='
WAYLAND_DISPLAY=wayland-0
$ < "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^XDG_CURRENT_DESKTOP='
XDG_CURRENT_DESKTOP=ubuntu
$ cat /usr/share/xdg-desktop-portal/gnome-portals.conf
[preferred]
default=gnome;gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;