Bug 460610

Summary: [wayland] KRDC main window elements stop being properly repainted/refreshed after disconnecting RDP session.
Product: [Applications] krdc Reporter: S.Trzmiel <xeno>
Component: generalAssignee: Urs Wolfer <uwolfer>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aacid, ctrlaltca, mike
Priority: NOR Keywords: wayland-only
Version First Reported In: 22.08.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S.Trzmiel 2022-10-17 17:12:26 UTC
Under wayland, once RDP session is disconnected main krdc window is not repainted properly.
Search bar stops being refreshed if one character is deleted from search, however search results reflect edited search.
If connection search bar is cleared user has to move mouse over the window to refresh connections list.

Those issues are not present under X11 session or prior to making RDP connection

STEPS TO REPRODUCE
1. Run krdc under plasma-wayland session
2. Connect to any RDP session from saved sessions.
3. Disconnect session.
4. Try to edit content of the search bar (ie try to delete few last chars using backspace)
5. Clear searchbar with clear button.

OBSERVED RESULT
Search bar stops being refreshed after one char is deleted 
If our last session shown in search bar is rdp://user@192.168.1.111 and user deleted last two digits, search bar gets stuck showing rdp://user@192.168.1.11 and stays that way until all the searchbar content is deleted. 
If clear searchbar button was used list of saved connections  still shows connections matching last search, moving mouse cursor over triggers list refresh.


EXPECTED RESULT
Searchbar in any time is repainted after each character deletion/edit 
Connections list content refreshed after click on clear searchbar button.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 36 86_x64 
KDE Plasma Version: 5.26
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5 / 5.15.6
freerdp: 2.8.0
Comment 1 Mike Russo 2022-10-31 13:43:21 UTC
This is also affecting me after just upgrading to Ubuntu 22.10. But I'm running KRDC under GNOME 43 and Xorg, not Wayland.
Comment 2 Mike Russo 2022-10-31 14:10:02 UTC
This issue is worse for me, just opening a new connection then going back to the first shows me a blank blue screen for my connections and eventually KRDC becomes unresponsive and unusable.  I will try running under a KDE session on a new user account as well (I tried under KDE session on Xephyr under my account and same thing happens).
Comment 3 S.Trzmiel 2022-12-02 19:54:09 UTC
Recent updates (Plasma 5.26.4-1, KF5-5.100) made it even worse now even with searchbar empty window refuses to refresh. Is this app even maintained?
Comment 4 Mike Russo 2022-12-02 20:09:36 UTC
(In reply to S.Trzmiel from comment #3)
> Recent updates (Plasma 5.26.4-1, KF5-5.100) made it even worse now even with
> searchbar empty window refuses to refresh. Is this app even maintained?

actually I think they said the maintainer is not really able to keep up with it anymore which is a shame because it really is useful when it works. however i found in https://bugs.kde.org/show_bug.cgi?id=460089 that Qt 5.15.7 does fix these problems.  It's just not so easy to get it compiled, but Fedora might move faster to get that version in the repos.
Comment 5 Albert Astals Cid 2022-12-02 20:46:38 UTC
> Those issues are not present under X11

This is your answer.
Comment 6 S.Trzmiel 2022-12-02 20:49:00 UTC
Well, so that's not right answer as Plasma is moving towards wayland sesion by default. It's sad to see KDE apps bitrot :(
Comment 7 S.Trzmiel 2022-12-05 10:12:21 UTC
(In reply to Mike Russo from comment #4)


> however i found in https://bugs.kde.org/show_bug.cgi?id=460089 that Qt
> 5.15.7 does fix these problems.  It's just not so easy to get it compiled,
> but Fedora might move faster to get that version in the repos.
 

Hi,
Thanks for headsup, but unfortunately this bug  is not fixed by Qt5 5.15.7 update. I'm already on KF5-5.100/Qt5 5.15.7 , yet still krdc under wayland open remote desktop in separate window leaving main app window corrupted.
Comment 8 Mike Russo 2022-12-05 13:45:16 UTC
(In reply to S.Trzmiel from comment #7)
> 
> Hi,
> Thanks for headsup, but unfortunately this bug  is not fixed by Qt5 5.15.7
> update. I'm already on KF5-5.100/Qt5 5.15.7 , yet still krdc under wayland
> open remote desktop in separate window leaving main app window corrupted.

Ah, sorry about that - I know I saw that under wayland it's always opened in a separate window, because they are using X11 embed to put the xfreerdp inside krdc window.  It would need rewrite to work with window inside.  Though you can probably run only krdc through Xwayland somehow?
Comment 9 S.Trzmiel 2022-12-05 15:23:54 UTC
TBH I don't min't running freerdp in separate window, the thing that makes krdc unusable is corrupted and unresponsive main window.
Comment 10 Mike Russo 2022-12-05 15:35:39 UTC
(In reply to S.Trzmiel from comment #9)
> TBH I don't min't running freerdp in separate window, the thing that makes
> krdc unusable is corrupted and unresponsive main window.

What happens if you start up a Konsole window, set the environment variable to run in X11 like
export QT_QPA_PLATF0RM=xcb
and then run krdc from that window?  That will let you have the rest of your desktop using Wayland, but start up Xwayland (if it's not already running) and run krdc in Xwayland.
Comment 11 S.Trzmiel 2022-12-06 11:58:14 UTC
Launching krdc with env variable QT_QPA_PLATF0RM set made no changes.
Comment 12 Fabio 2025-01-21 15:37:20 UTC
Krdc used to have problems with RDP connections under Wayland, since it ran xfreerdp directly.
RDP support has been rewritten as of 24.* version, and now it works fine for most of the people under wayland.
Feel free to open a new ticket if you experience bugs on a more recent version.
Comment 13 Bug Janitor Service 2025-02-05 03:47:00 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 14 Bug Janitor Service 2025-02-20 03:46:46 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.