This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Does KDE need to do all it does at startup?

Tags: None
(comma "," separated)
User avatar
olorian
Registered Member
Posts
8
Karma
0
OS
Hi everybody.
I hope I'm not asking something you can find everywhere in the forum. As I couldn't find it here nor in the FAQs, I've opened this topic.

I'll put it simple.
KDE 4.X on my super-hyper-one-but-last-generation laptop has always started WAY Slower than KDE 3.X on [now] my father's Pentium IV desktop.
Why must it be so?
Why do programs in general always require more and more ressources as hardware becomes more powerful? Years and years have passed, but most systems still need one minute or so to boot. If you use KDE 4.X, you'll need two minutes, because it does a lot of things. But what exactly?

Whenever I have to restart KWin or Plasma, it only takes some seconds, programs such as HAL had already loaded before KDM, so which other vital programs need to be started before Plasma can be used?

I've looked in the /usr/bin/startkde script, and found some operations, such as the rebuilding of font list every time you start KDE, really questionable. Yet I couldn't comment out lots of lines, as I don't really know much of it. I'm no programmer. I could just save a pair seconds.

If I try and make a custom Xsession, I always get answered that no dbus is running and so no Plasma can start.

Is there something I can do to make KDE's startup faster? Which programs are vital to an Xsession, that I could write it myself?
For example, for Gnome you could just launch gnome-panel, gnome-session-manager and metacity, and you would get an usable system that would need only a pair of seconds to start and be ready. How could you do the same in KDE?


Please don't answer something like "just use hibernation", as that would be no solution. Gnome and Xfce [and KDE 3.X] can start in few seconds, I don't see why KDE 4.X should just not be able to.


Thank you everybody. Please don't be offended in any way by this post, as I'm not arguing about KDE's staff's work at all. On the opposite, I appreciate it a lot.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
See following section of code from /usr/bin/startkde
Code: Select all
# D-Bus autolaunch is broken
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
fi
if qdbus >/dev/null 2>/dev/null; then
    : # ok
else
    echo 'startkde: Could not start D-Bus. Can you call qdbus?'  1>&2
    test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
    xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
    exit 1
fi


This code starts the D-Bus daemon, which KDE applications use to intercommunicate.

The code following after that is mostly crucial code, which marks it as KDE session and launches the processes which form a KDE session. The code following ksmserver handles the shutdown of a KDE session once you have logged out.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
olorian
Registered Member
Posts
8
Karma
0
OS
Thank you very much.
I really don't understand: I commented out entire sections, except for some lines which proved to be required to start, such as
Code: Select all
lnusertemp=`kde4-config --path exe --locate lnusertemp`
yet it hasn't got any faster At All, on the opposite it appears to have slowed down. There's a lot of HD activity, even if it doesn't have to do a lot at all except declaring variables, according to startkde.

I though most of it could be due to this part
Code: Select all
libpath=`kde4-config --path lib | tr : '\n'`

for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
  for file in "$prefix"*.sh; do
    test -r "$file" && . "$file"
  done
done

as I though it was responsible for loading some libs, but actually it only loads .sh files.

I'll do some more test..
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
You might want to try this: viewtopic.php?f=27&t=91649


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]