Here's the third published video of my FOSDEM talks, about the Varlink IPC system:

https://video.fosdem.org/2026/ub2147/NFNKEK-varlink-ipc-system-keynote.av1.webm

This was the last one of the three. Enjoy!

#systemd #fosdem #fosdem2026

@pid_eins should have counted the context switches of a portal call for maximum effect :p
@swick i am curious, for some simple portal how many context switches would you guess? (For a single portal gated request, ideally non-interactive if there is such a thing)

@pid_eins

best case: 6 context switches [request: app -> dbus-proxy -> broker -> portal frontend] -> [response: broker -> dbus-proxy -> app]

but with auth required on every connection: 8 context switches [request: app -> dbus-proxy -> broker -> portal frontend -> [credentials: broker -> portal frontend]] -> [response: broker -> dbus-proxy -> app]

and with a backend call: 12 context switches [request: app -> dbus-proxy -> broker -> portal frontend -> [credentials: broker -> portal frontend] -> broker -> portal backend] -> [response: broker -> portal frontend -> broker -> dbus-proxy -> app]

@pid_eins oh, and with varlink and appd it can be exactly two because no more dbus-proxy, no more frontend/backend split, and no call for the creds/permissions.

How does appd fit into this? Varlink alone seems like it'd be enough to replace dbus. Would appd be for authentication and such?

P.S. we should definitely expose varlink interfaces as alternatives to DBus if possible in the nearer future than appd ;p

@ryanabx well, appd would allow us to go from unix socket to app identity.

I am a bit worried about people exposing all kinds of varlink interfaces to sandboxed apps. the nice part about portals is that it forces everyone through one place where we make sure everything functions correctly together without poking holes in the security. we really have to retain that.

@swick @pid_eins you should multiply that by two, since you're switching into and out of kernel mode on every turn. Also GDBus that underlies this all does a bunch of thread hopping internally, so there's more switches still.

@pid_eins Problems with D-Bus 3.5:

  • Polkit is only for privileged services => trying to sandbox a user service (e.g. ProtectSystem=strict, ProtectHome=read-only) is often useless

This is why flatpak has to use the dbus-proxy. Proxy that can be avoided using cgroup extended attributes