Bug 413476

Summary: Wayland/Pipewire segfault on connection
Product: [Applications] krfb Reporter: Tom B <tom>
Component: generalAssignee: George Goldberg <grundleborg>
Status: RESOLVED WORKSFORME    
Severity: normal CC: alexey.min, postix, rdieter
Priority: NOR    
Version First Reported In: 19.08.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tom B 2019-10-26 13:52:26 UTC
SUMMARY

When a connection is received, Krfb crashes when using wayland/pw plugin.

STEPS TO REPRODUCE
1. Run Krfb on Wayland
2. Try to connect with KRDC

OBSERVED RESULT

Krfb accepts the login, asks for authorisation and once authorisation is granted, Krfb crashes. Log as follows:

$ krfb
found plugin at  "/usr/lib/qt/plugins/krfb/krfb_framebuffer_xcb.so"
Loaded plugin with name  "xcb"
found plugin at  "/usr/lib/qt/plugins/krfb/krfb_framebuffer_pw.so"
Loaded plugin with name  "pw"
found plugin at  "/usr/lib/qt/plugins/krfb/krfb_framebuffer_qt.so"
Loaded plugin with name  "qt"
Using FrameBuffer: "pw"
Initializing D-Bus connectivity with XDG Desktop Portal
DBus session created:  "/org/freedesktop/portal/desktop/request/1_49/krfb2951929398"
Starting server. Listen port: 5900 Listen Address: "0.0.0.0" Password enabled: true
Couldn't select sources for the screen-casting session
about to start authentication
found plugin at  "/usr/lib/qt/plugins/krfb/krfb_events_x11.so"
Loaded plugin with name  "x11"
found plugin at  "/usr/lib/qt/plugins/krfb/krfb_events_xdp.so"
Loaded plugin with name  "xdp"
Segmentation fault (core dumped)


EXPECTED RESULT

Linux/KDE Plasma: Arch / 5.17.1
(available in About System)
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: Qt5 5.13.1
Krfb version: 19.8.2 (not in the list above)

ADDITIONAL INFORMATION

It is very difficult to find documentation on what is required to get this working on wayland so I may be missing something.

On the host, I have installed pipewire and started the service. The log says says "Couldn't select sources for the screen-casting session" which suggests I might be missing something.

I am also running 2x 4k displays with a desktop resolution of 7680x2160 which may be a higher resolution that something in the stack supports.
Comment 1 Alexey Min 2019-12-16 10:58:22 UTC
> It is very difficult to find documentation on what is required to get this working on wayland so I may be missing something.

Hi!
You need to have xdg-desktop-portal and xdg-desktop-portal-kde that are built with screencast support. You can verify that manually with some dbus viewer (like qdbusviewer) that portals on dbus have that interface.

I've tested krfb in wayland on 4k monitor and it worked fine.

We need some backtrace to know what's happening here
Comment 2 Tom B 2020-01-26 18:10:49 UTC
what is the best way to get a backtrace? Trying it again a few months later with the most recent versions of each package, I am still getting the same problem. 

dmesg shows the following:

[315423.305190] krfb[2750682]: segfault at 0 ip 00007f9043935858 sp 00007ffe0d6942c8 error 4 in libvncserver.so.0.9.12[7f9043910000+31000]
[315423.305204] Code: 57 08 49 8b ba 98 02 00 00 4d 63 52 10 41 0f af d2 41 80 fb 10 74 5b 41 80 fb 20 0f 85 a1 00 00 00 8d 14 b2 48 63 d2 48 01 d7 <8b> 17 84 c0 0f 85 4e 01 00 00 45 85 c0 0f 8e e0 00 00 00 8d 41 ff


Though that alone probably isn't very useful.
Comment 3 postix 2025-06-25 12:12:32 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Plasma 6.4.x (the latest released version).
Comment 4 Bug Janitor Service 2025-07-10 03:47:57 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2025-07-25 03:46:58 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.