Bug 342682

Summary: Very slow KRDC start (> 15 seconds)
Product: [Applications] krdc Reporter: Diego Viola <diego.viola>
Component: generalAssignee: Urs Wolfer <uwolfer>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: krdc output
krdc output 2
krdc output 3

Description Diego Viola 2015-01-10 03:23:02 UTC
KRDC starts very slow on my machine, even after closing the program and starting it again (I can reproduce this every time).

I'm not sure why that is, I don't have this problem with any other KDE app, I also tried other RDP clients such as Remmina and they start very quickly (~1 second).

But starting KRDC takes more than 10 seconds.

[diego@myhost ~]$ time krdc
krdc(7461): KPluginFactory could not load the plugin: "krdc_vncplugin" 
tp-qt 0.9.5 DEBUG: Register StreamTubeClient with name  "krdc_rfb_handler"  
tp-qt 0.9.5 DEBUG: Client registered - busName: "org.freedesktop.Telepathy.Client.krdc_rfb_handler" objectPath: "/org/freedesktop/Telepathy/Client/krdc_rfb_handler" interfaces: ("org.freedesktop.Telepathy.Client.Handler")  
QDBusObjectPath: invalid path ""
krdc(7461)/kdeui (kdelibs): Attempt to use QAction "remote_desktop_dockwidget" with KXMLGUIFactory! 
krdc(7461)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:

real    0m25.849s
user    0m0.170s
sys     0m0.040s
[diego@myhost ~]$ 

Any ideas?

Reproducible: Always

Steps to Reproduce:
1. Start krdc
2. Wait
3. Repeat

Actual Results:  
KRDC takes more than 10 seconds to start, while other apps take less than a second.

Expected Results:  
KRDC should start quickly.
Comment 1 Diego Viola 2015-01-10 03:23:57 UTC
My system is Arch Linux (x86_64).

2 GB of RAM
Pentium(R) Dual-Core  CPU      E5500  @ 2.80GHz
Comment 2 Diego Viola 2015-01-10 03:24:35 UTC
Please let me know if you need additional information on this, I'm happy to provide more info.
Comment 3 Diego Viola 2015-01-10 03:25:47 UTC
It takes usually more than 10 seconds before KRDC would even start.
Comment 4 Diego Viola 2015-01-10 03:26:10 UTC
After KRDC starts I get no more problems with the app, and I can use it fine, it's not slow anymore.
Comment 5 Urs Wolfer 2015-01-10 12:39:01 UTC
* Did it work some time ago as expected?
* Do you have the same issues with other KDE applications as well?
* You could try to mave away KRDC configs (do not forget to backup them): ~/.kde4/share/config/krdcrc & ~/.kde4/share/apps/krdc/bookmarks.xml
Comment 6 Diego Viola 2015-01-10 18:06:13 UTC
(In reply to Urs Wolfer from comment #5)
> * Did it work some time ago as expected?

No. This is the first time I use the app.

> * Do you have the same issues with other KDE applications as well?

No. All the other apps I use start immediately.

> * You could try to mave away KRDC configs (do not forget to backup them):
> ~/.kde4/share/config/krdcrc & ~/.kde4/share/apps/krdc/bookmarks.xml

I already removed my ~/.kde4 and started all the config from scratch, it did not make any difference. KRDC still starts very slow.
Comment 7 Urs Wolfer 2015-01-10 18:55:57 UTC
Please run 'kdebugdialog' and enable all krdc debug categories. Then please post the output while starting from a terminal here (please ensure that no private data is included in the logs).
Comment 8 Diego Viola 2015-01-10 19:04:46 UTC
Created attachment 90329 [details]
krdc output
Comment 9 Urs Wolfer 2015-01-10 19:15:09 UTC
Thanks for your fast feedback.

It looks like this is causing problems: "MainWindow::loadAllPlugins: Error loading KRDC plugin ( "krdc_vncplugin" )""

What version of libvncserver do you have installed?
Comment 10 Diego Viola 2015-01-10 19:17:47 UTC
Created attachment 90330 [details]
krdc output 2

I've just installed libvncserver 0.9.10 and the problem still persist. Please see the output attached.
Comment 11 Diego Viola 2015-01-10 19:20:08 UTC
When I didn't had libvncserver enabled I would also disable the VNC plugin from preferences to see if that helped, but it didn't help. I can't say for sure but I don't think the lack of the VNC plugin is the problem here as I can still reproduce it with and without that installed.
Comment 12 Diego Viola 2015-01-10 19:20:40 UTC
(In reply to Diego Viola from comment #11)
> When I didn't had libvncserver enabled I would also disable the VNC plugin
> from preferences to see if that helped, but it didn't help. I can't say for
> sure but I don't think the lack of the VNC plugin is the problem here as I
> can still reproduce it with and without that installed.

s/enabled/installed/
Comment 13 Urs Wolfer 2015-01-10 19:28:15 UTC
It looks like a timeout at some place since it takes almost exactly 25s. It is probably related to issue #320151.

You could try to install kdenetwork-zeroconf-ioslave.
Comment 14 Diego Viola 2015-01-10 19:34:54 UTC
Created attachment 90331 [details]
krdc output 3

Still hangs after installing kdenetwork-zeroconf-ioslave
Comment 15 Diego Viola 2015-01-10 19:36:25 UTC
This is the line where it times out:

tp-qt 0.9.5 DEBUG: Client registered - busName: "org.freedesktop.Telepathy.Client.krdc_rfb_handler" objectPath: "/org/freedesktop/Telepathy/Client/krdc_rfb_handler" interfaces: ("org.freedesktop.Telepathy.Client.Handler")  

After the program is started I see this:

QDBusObjectPath: invalid path ""
krdc(1423) RemoteDesktopsModel::RemoteDesktopsModel: Browsing for zeroconf hosts.
krdc(1423)/kdeui (kdelibs): Attempt to use QAction "remote_desktop_dockwidget" with KXMLGUIFactory! 
krdc(1423) MainWindow::updateActionStatus: -1
krdc(1423) MainWindow::tabChanged: 0
krdc(1423) MainWindow::updateActionStatus: 0
krdc(1423) main: ########## KRDC ready: 25160 ms ##########
Comment 16 Diego Viola 2015-01-10 20:34:18 UTC
Any ideas what else to try please?
Comment 17 Urs Wolfer 2015-01-10 20:54:43 UTC
Ok, it looks like a dbus problem. 25seconds is a typical timout there from what I have found with a web search. Since you are using archlinx, dbus daemon shoud be started. Please verify that dbus is running properly.
Comment 18 Diego Viola 2015-01-10 21:02:10 UTC
(In reply to Urs Wolfer from comment #17)
> Ok, it looks like a dbus problem. 25seconds is a typical timout there from
> what I have found with a web search. Since you are using archlinx, dbus
> daemon shoud be started. Please verify that dbus is running properly.

Yes, dbus is running ok on my system:

[root@myhost ~]# systemctl status dbus
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
   Active: active (running) since Sat 2015-01-10 15:40:29 BRST; 3h 21min ago
     Docs: man:dbus-daemon(1)
 Main PID: 196 (dbus-daemon)
   CGroup: /system.slice/dbus.service
           └─196 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
Comment 19 Urs Wolfer 2015-01-11 14:14:00 UTC
I do not really have any more ideas here... :(

Do you have an up-to-date archlinux system? What's your KDE / KRDC version?

Probably also a reboot could help because some dbus stuff is messed up.
Comment 20 Urs Wolfer 2015-01-11 14:22:11 UTC
Probably you could also checkout this: https://bbs.archlinux.org/viewtopic.php?pid=1389739
Comment 21 Diego Viola 2015-01-11 14:59:40 UTC
(In reply to Urs Wolfer from comment #19)
> I do not really have any more ideas here... :(
> 
> Do you have an up-to-date archlinux system? What's your KDE / KRDC version?
> 
> Probably also a reboot could help because some dbus stuff is messed up.

Yes, my system is up-to-date.

KDE 4.14.3
KRDC 4.14.3

I tried rebooting also, it didn't help.
Comment 22 Diego Viola 2015-01-11 15:08:48 UTC
(In reply to Urs Wolfer from comment #20)
> Probably you could also checkout this:
> https://bbs.archlinux.org/viewtopic.php?pid=1389739

Thanks, is #331857 related to this issue?
Comment 23 Urs Wolfer 2015-01-12 20:23:27 UTC
I'm not sure if #331857 is related. Does the workaround posted in the archforum help in your case?
Comment 24 Diego Viola 2015-04-21 16:59:11 UTC
(In reply to Urs Wolfer from comment #23)
> I'm not sure if #331857 is related. Does the workaround posted in the
> archforum help in your case?

No, it doesn't.
Comment 25 Justin Zobel 2020-11-21 12:01:31 UTC
As it has been a long time since this was posted, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 26 Diego Viola 2020-11-23 06:32:32 UTC
(In reply to Justin Zobel from comment #25)
> As it has been a long time since this was posted, can you please test and
> confirm if this issue is still occurring or if this bug report can be marked
> as resolved. I've set the bug status to "needsinfo" pending your response,
> please change back to "reported" or "resolved" when you respond, thanks.

I can't reproduce this anymore. KRDC starts very quickly now.

Closing this issue as resolved.
Comment 27 Diego Viola 2020-11-23 06:34:42 UTC
Thank you.
Comment 28 Diego Viola 2020-11-23 07:00:54 UTC
I think it's entirely possible that this bug was caused by a hardware failure, I remember I was running Arch off a USB external hard drive which failed (with I/O errors) soon after I reported this bug.