/srv/irclogs.ubuntu.com/2021/05/25/#ubuntu-desktop.txt

seb128goood morning desktopers05:22
dufluMorning seb128 05:29
jibelGood morning05:32
dufluMorning jibel 05:45
callmepkmorning seb128 jibel and afternoon duflu05:48
oSoMoNgood morning desktoppers05:53
dufluHi callmepk and oSoMoN 05:54
oSoMoNhey duflu 05:54
callmepkmorning oSoMoN 05:54
oSoMoNhey callmepk 05:55
ricotzgood morning05:55
dufluMorning ricotz 05:55
oSoMoN_good morning ricotz 06:24
jibelHi duflu callmepk oSoMoN_ 06:30
* ricotz wonders if there is a deadline for moving for libera.chat06:33
callmepkhi jibel ricotz 06:35
callmepkNot seeing much people from here at libera.chat though06:36
oSoMoN_salut jibel 06:36
=== oSoMoN_ is now known as oSoMoN
seb128hey duflu callmepk oSoMoN ricotz jibel, how are you?06:47
seb128oSoMoN, wb, did you have some nice holidays?06:47
callmepkseb128 it's okay, how about you?06:48
seb128callmepk, tired but alright otherwise I think!06:49
didrocksgood morning07:01
callmepkhi didrocks 07:03
marcustomlinsonmorning callmepk duflu jibel oSoMoN ricotz seb128 didrocks07:04
dufluHi didrocks and marcustomlinson 07:04
callmepkhi marcustomlinson 07:04
didrockshey callmepk, marcustomlinson, duflu!07:07
jibelHi marcustomlinson didrocks 07:11
jibelseb128, doing well, thanks.07:12
didrockssalut jibel 07:12
seb128hey marcustomlinson, lut didrocks, how are you?07:40
didrocksseb128: I’m fine, thanks, and you?07:41
marcustomlinsonseb128: still a little low on energy but doing better thanks07:42
seb128didrocks, it was nice!07:44
seb128marcustomlinson, get better!07:44
Nafallomorning to the old network :-D07:52
ogra... the network for the elderly ... 08:17
oSoMoNhey seb128, thanks! holidays were nice, not very relaxing as we moved a lot, but good anyway08:24
oSoMoNand we got lots of sun and good food08:24
oSoMoNsalut didrocks, hey marcustomlinson, Nafallo and ogra 08:24
* ogra waves with his cane08:25
oSoMoNgotta come to terms with it, we're part of the old guard…08:25
ograyeah 🙂08:25
didrockshey hey oSoMoN, Nafallo 08:29
=== ogra_ is now known as Guest30743
WimpressMorning o/09:14
WimpressoSoMoN: I have news :)09:14
WimpressThere is a 'screencast-legacy' interface.09:15
WimpressAdding that and manually connecting it get me new and interesting crashes and debug output :D09:15
WimpressoSoMoN: And is works!09:18
oSoMoNWimpress, interesting, let me try that with chromium09:18
oSoMoNwhat else (apart from connecting that interface) did you have to do to make it work?09:18
WimpressPIPEWIRE_CONFIG_NAME: $SNAP/usr/share/pipewire/pipewire.conf09:18
WimpressThat ^ was required, to reference where the source part build of pipewire pout the config.09:19
Wimpresshttps://usercontent.irccloud-cdn.com/file/D40ymvNh/image.png09:20
oSoMoNI already had "PIPEWIRE_CONFIG_NAME: $SNAP/etc/pipewire/pipewire.conf" in my snapcraft.yaml, not sure why the difference in the install path09:21
WimpressYes. But that is not where the config file is placed.09:22
WimpressAt least not with how I build pipewire.09:23
oSoMoNWimpress, the only relevant difference I can see between my source part and yours, in this regard, is that I'm building pipewire 0.3.26, and you're building 0.3.2809:31
WimpressWeird.09:31
Wimpress`squashfs-root/usr/share/pipewire/pipewire.conf`09:32
oSoMoNand indeed, quoting https://gitlab.freedesktop.org/pipewire/pipewire/-/releases#highlights : « Config files are now installed in the data dir, system09:32
oSoMoNoverrides in /etc/pipewire and $HOME are checked first. »09:32
WimpressI have nothing in `etc` for pipewire in my snap.09:32
oSoMoNso it's just an upstream change09:32
WimpressOK, so you found the reason :-)09:32
Wimpresshttps://github.com/snapcrafters/obs-studio/commit/71b89c6f9e07971d5d7d35757f1199fcf47b1d8409:33
oSoMoNlet's see if adding the screencast-legacy plug makes it work for chromium09:35
jameshif they've got pipewire support, it shouldn't be much trouble to use the xdg-desktop-portal interface and ditch screencast-legacy09:35
oSoMoNthey do: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc09:38
Wimpressjamesh: o/09:39
WimpressSo, is xdg-desktop-portal a discrete interface or part of the desktop interface?09:39
jameshdesktop interface09:40
WimpressIn addition to defining the desktop interface in the yaml, what else is required?09:41
jameshWimpress: it certainly looks like OBS is using portals: https://github.com/obsproject/obs-studio/blob/master/plugins/linux-capture/pipewire.c#L1074-L108109:41
WimpressYes, it is.09:41
WimpressBut until I added `screencast-legacy` I couldn't get screen/window capture to work under Wayland. 09:42
jameshWimpress: it shouldn't require any extra interface connections.  All screencast-legacy gives you is permission to call a few gnome-shell D-Bus calls that OBS doesn't even seem to be using09:42
WimpressI got the idea from here: https://github.com/xlmnxp/blue-recorder/blob/master/snap/snapcraft.yaml#L4509:43
jameshWimpress: this is all that screencast-legacy is giving you: https://github.com/snapcore/snapd/blob/264284dfbd0b4e1f2f5df50719672f3fb1f91839/interfaces/builtin/screencast_legacy.go#L33-L52 -- if you're not calling any of those D-Bus methods, then it likely isn't doing anything09:45
jameshmaybe try your working snap build and see what happens when you leave screencast-legacy unconnected?09:45
WimpressOK09:46
WimpressThe obs-studio snap in the edge channel has this all enablked.09:46
WimpressThe obs-studio snap in the edge channel has this all enabled.09:46
jameshWimpress: in the case of that blue-recorder snap, it really is using the non-portal interface: https://github.com/xlmnxp/blue-recorder/blob/f4a8461ac725e8a9b77457e254f965222fee6222/src/ffmpeg_interface.rs#L68-L7109:47
WimpressHuh.09:47
WimpressDisconnected screencast-legacy, and it still works.09:48
WimpressSo, in my case. Just fixing the path to the pipewire config seems to have been the remedy.09:48
jameshApps like Firefox are using the portal interface even when not running confined, since it gives them a single code path that will work on both GNOME and KDE desktops09:48
jameshthat's one less interface that you'd need to request auto-connection for :-)09:50
oSoMoNjamesh, I'm seeing this with the chromium snap:09:50
oSoMoN[W][000018638.526850][module-portal.c:147 on_portal_pid_received()] Failed to receive portal pid: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.202" (uid=1000 pid=59101 comm="/snap/chromium/x2/usr/lib/chromium-browser/chrome " label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="GetConnectionUnixProcessID" erro09:50
oSoMoNr name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)09:50
oSoMoNnot sure how relevant that is09:51
WimpressoSoMoN: See the same denial here too.09:53
oSoMoNso probably harmless09:53
WimpressHowever, try and share more that one window/screen and pipewire segfaults.09:53
Wimpress*more than one09:54
jameshoSoMoN: weird.   It looks like that method should be allowed by desktop-legacy, which it looks like you plug09:54
oSoMoNyes09:54
oSoMoNthe portal window says "Select window to share with (null)", so the name of the application is not being passed through correctly09:55
jameshthe app name is something we need to fix on the portal side.  It's not something you can do from within the sandbox09:56
oSoMoNand gnome shell shows the active screen sharing indicator, but no actual content is being shared in chromium09:56
oSoMoNok09:56
jamesh(since it is meant to be info the sandboxed app can't forge)09:56
jameshoSoMoN: on my system, it certainly looks like /var/lib/snapd/apparmor/profiles/snap.chromium.chromium has the rules to allow calling GetConnectionUnixProcessID09:59
oSoMoNit does here too, but I'm still seeing this denial: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/" interface="org.freedesktop.DBus" member="GetConnectionUnixProcessID" mask="send" name="org.freedesktop.DBus" pid=61781 label="snap.chromium.chromium" peer_label="unconfined"10:02
jameshoSoMoN: ah.  it's the path10:02
oSoMoNyeah, path="/"10:03
jameshlooks like this is the source: https://github.com/PipeWire/pipewire/blob/4e70799922c5e5859720f8987c53f7794e833f3c/src/modules/module-portal.c#L175-L17810:03
jameshwhy isn't it using /org/freedesktop/DBus as the object path?10:03
jameshthat looks like a straight up bug in pipewire10:05
oSoMoNI'll rebuild the part from source with a patch to fix the path, let's see if it helps10:09
oSoMoNjamesh, I patched the path and rebuilt libpipewire-module-portal.so in the snap, the denial goes away but still no actual screen content being shared10:26
ograoSoMoN, screencast-legacy definitely helps as last resort i found ... (for zoom-client i added it on the weekend)10:30
jameshoSoMoN: thinking about it more, I'm curious about why that code would be running inside the sandbox in the first place.10:30
jameshoSoMoN: as I understand it, the modules get loaded into the pipewire daemon: not the client applications10:30
jameshogra: assuming the application was written to use the old screencast API, which is not the case here.10:31
oSoMoNyeah, screencast-legacy doesn't make a difference here10:34
jameshif you can't find the string org.gnome.Shell.Screencast in any of your binaries, you probably don't want screencast-legacy10:35
ograjamesh, oh, ouch11:02
ograthat might also be the reason why zoom can only share the full screen and not single apps under wayland then11:02
=== acheronuk is now known as RikMills
=== rikmills is now known as RikMills
=== RikMills is now known as RikMills_
=== RikMills_ is now known as rikmills_
=== rikmills_ is now known as RikMills
hellsworthgood morning desktopers15:08
oSoMoNhey hellsworth 15:08
marcustomlinsonmorning hellsworth15:08
hellsworthhi guys :)15:08
didrocks999hey hellsworth!15:10
hellswortho/ didrocks999 15:10
=== E_Eickmeyer is now known as Eickmeyer
ricotzhey hellsworth 15:49
hellsworthhi there ricotz 16:34

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!