RDP connection never works on 1st try, often crashes on 2nd try
I've been using Connections installed via flatpak to remote into my 2nd Ubuntu laptop. I used VNC in the past (with vino from Ubuntu 20.04's on the other side), and now I've switched to RDP (with gnome-remote-desktop from Ubuntu 22.04 on the other side).
The RDP connection rarely connects on 1st attempt. All I see is a spinning spinner that never goes away, until I get bored and click the back button. Then I click the saved connection again, and Connections either connects or segfaults.
I ran G_MESSAGES_DEBUG=all flatpak run org.gnome.Connections
and this is what it was showing:
- lots of messages on startup
-
(gnome-connections:2): GLib-DEBUG: 10:01:54.086: g_unix_open_pipe() called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
when I click the savedrdp://platonas.lan:3389
connection - nothing at all while it's showing the spinning spinner
- then I click the
<
(Back) button and click the connection again
(gnome-connections:2): GLib-DEBUG: 10:01:54.086: g_unix_open_pipe() called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
(gnome-connections:2): GLib-DEBUG: 10:02:07.360: g_unix_open_pipe() called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
** (gnome-connections:2): DEBUG: 10:02:07.462: Connecting to platonas.lan…
** (gnome-connections:2): DEBUG: 10:02:07.462: Connecting to platonas.lan…
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
[10:02:07:206] [2:13] [WARN][com.freerdp.core.client] - Skipping, channel already loaded
[10:02:07:207] [2:13] [WARN][com.freerdp.core.client] - Skipping, channel already loaded
[10:02:07:207] [2:13] [WARN][com.freerdp.core.client] - Skipping, channel already loaded
[10:02:07:207] [2:13] [WARN][com.freerdp.core.client] - Skipping, channel already loaded
[10:02:07:582] [2:13] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 11: Resursas laikinai neprieinamas
[10:02:07:582] [2:16] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 11: Resursas laikinai neprieinamas
[10:02:07:582] [2:16] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[10:02:07:582] [2:13] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[10:02:07:582] [2:13] [ERROR][com.freerdp.core] - transport_read_layer: TODO: Trying to set error code ERRCONNECT_CONNECT_TRANSPORT_FAILED, but ERRCONNECT_CONNECT_TRANSPORT_FAILED already set!
and it gets killed by SIGSEGV ($!
is 139 in my shell, which means signal 11).
When I ran Connections from gnome-shell rather than a terminal, I also saw this in journalctl:
spal. 29 09:55:43 blynas kernel: traps: pool-gnome-conn[25591] general protection fault ip:7ff6251b04fd sp:7ff60ddfd6b0 error:0 in libfreerdp2.so.2.11.2[7ff6250e7000+12b000]
Unfortunately I don't know how to get a full traceback from a flatpak'd application. Ubuntu's apport doesn't appear to be intercepting flatpak crashes and there are no new files in my /var/crash/.
One clue is the four repetitions of
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
When I manage to get connections to actually connect to RDP, I see just two of these:
** (gnome-connections:2): DEBUG: 09:59:09.989: connection.vala:159: No credentials found in keyring. Prompting user.
** (gnome-connections:2): DEBUG: 09:59:29.072: Connecting to platonas.lan…
sh: eilutė 1: xprop: komanda nerasta
sh: eilutė 1: xprop: komanda nerasta
[09:59:29:357] [2:17] [WARN][com.freerdp.crypto] - Certificate verification failure 'self-signed certificate (18)' at stack position 0
[09:59:29:357] [2:17] [WARN][com.freerdp.crypto] - CN = GNOME, C = US
[09:59:30:667] [2:17] [INFO][com.freerdp.gdi] - Local framebuffer format PIXEL_FORMAT_BGRA32
[09:59:30:667] [2:17] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_BGRA32
[09:59:30:676] [2:17] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
[09:59:30:677] [2:17] [INFO][com.freerdp.channels.drdynvc.client] - Loading Dynamic Virtual Channel disp
[09:59:30:677] [2:17] [INFO][com.freerdp.channels.drdynvc.client] - Loading Dynamic Virtual Channel rdpgfx
fuse: device not found, try 'modprobe fuse' first
fuse: reading device: Blogas failo deskriptorius
** (gnome-connections:2): DEBUG: 09:59:30.948: Connection established
(gnome-connections:2): GLib-DEBUG: 09:59:31.034: g_unix_open_pipe() called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
which makes me think that my initial connection (the one that froze) goes through when I try again, and Connections ends up connecting to the same RDP server twice in parallel, which confuses something in its internal state and causes the crash.