10

A few days ago I noticed that after I login in, the top panel and the dash took a bit more time to load and I noticed more disc activity than usual.

I thought that it might have been caused by some update or by the installation of pdftk. So I removed pdftk but the "problem" persists.

Is there a way to know what is using the disc (read/write operations) on startup?

If it were at a later time, I would use iotop but I can only launch iotop after I get control of the desktop.

I'm on Ubuntu 12.10 amd64.

Edit

I took a look at the logs and in the Xorg.0.log file I found the following lines:

[    36.230] (II) XKB: reuse xkmfile /var/lib/xkb/server-ED81635D9DABCAA502951B920776FB5895D92DC0.xkm
[  6683.340] (II) XKB: generating xkmfile /var/lib/xkb/server-7111F82C412662D491D0F0A3A5A74C8F62B59F29.xkm

Could this be the problematic step?

To Do
  • 15,502
  • 1
    It seems this is a reoccurring question now that Ubuntu has become stable enough where people are updating from older LTS versions, or trying different desktop environments. We need a more elegant way to manage this without being a guru, or spending an hour looking at log files. – Goddard Dec 10 '12 at 17:21

5 Answers5

5

This is the same problem i "WAS" facing but solved it, seems like a startup application was causing that problem.

Ok here is what i did -

sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

open startup application then uncheck - DISK NOTIFICATION (The Disk Utility notification is used to report disk failures using the SMART predictive technology). It explains your quote also

I noticed more disc activity than usual

if u like u can also shutoff (it depends on your needs) -

AT-SPI D-BUS BUS, Backup Monitor, Check for new hardware drivers, Desktop Sharing, Onboard, Ocra Screen Reader, Personal file sharing,

Before unity was taking near approx. about 20 seconds to load now it takes 3 seconds roughly.

  • How would you "shutoff" the services you mentioned? They are not in the Startup applications list. Neither is Disk notification. – To Do Dec 10 '12 at 10:12
  • What does the sed -i … command do? – To Do Dec 10 '12 at 10:13
  • 1
    the one liner i mentioned will make hidden startup item show in STARTUP APPLICATION. Open Startup application from shutdown menu or simply type gnome-session-properties in terminal and u will understand everything afterwards – Arin Chakraborty Dec 10 '12 at 10:25
  • did sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop run without any error ? – Arin Chakraborty Dec 10 '12 at 10:27
  • @ToDo take a look here if needed - link – Arin Chakraborty Dec 10 '12 at 10:34
  • does it work @ToDo ? I am curious. When i did that my login time drasticly changed from 20 to 3 sec. To test i renabled the Disk Notification and restarted my system to my surprise i noticed no slowdown afterwards. It is still 3 sec approx whether i enable or disable it. – Arin Chakraborty Dec 10 '12 at 10:52
  • 1
    There is no disk notification in my list. – To Do Dec 10 '12 at 15:44
  • 1
    Try disabling anything that is not important you can take help of this to do so, restart the machine and see if anything helps. Some disk action or perhaps some network activity at login is behind this slowdown thats for sure so turning them off during startup is the best option i guess. The trick is to find it. – Arin Chakraborty Dec 10 '12 at 20:23
  • @ArinChakraborty Those things don't show up in the new – Brandon Bertelsen Dec 10 '12 at 23:23
  • @BrandonBertelsen if the STARTUP list in the STARTUP APPLICATION is empty or is not showing the hidden contents then u must first execute the code

    sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop in the terminal.

    This one liner will make every hidden item visible in the STARTUP APPLICATION. ALl the best! Please inform if it works !

    – Arin Chakraborty Dec 11 '12 at 12:45
  • This tip worked very fine to see everything that start up! Btw it starts a huge load of things on 14.04... I was thinking I dont want to stop them, just that they do not load all at once... there may have a few that must be promptly started but most I think could be started in line (one per time) not using too much cpu and IO. – Aquarius Power Jun 02 '14 at 00:12
  • @ToDo no disknotification here either, did you solve it? – Aquarius Power Dec 24 '14 at 16:45
  • 1
    @Aquarius Power The idea is not to search for disknotification. Pick any suspecious startup activity. Turn it off and see if it works. And please before you turn off any startup item please google it and learn what it does. – Arin Chakraborty Dec 27 '14 at 17:05
1

What I would do for that is to open a console (or two) while the system starts with Ctrl+Alt+F1/F2 then use top in conjunction with iostat -x (from sysstat package) to determine what's happen.

Other useful tools you may need some time for that kind of problem are those from inotify-tools package : inotifywait and inotifywatch which permits to monitor files accesses.

0

Careful scrutiny of the logs should yield some information. While it might seem a bit tedious the logs can reveal some very interesting information about the machine as it is booting. For example the kernel log (/var/log/kern.log) gives a blow-by-blow description of what is happened timed down to the closest millisecond.

If kern.log doesn't reveal any useful information, try syslog and even authlog. You are looking for anything unusual such as error messages or something that gets repeated or retried many times. Most of the logs are time stamped to the millisecond, which can be really useful if you can synchronize real world problems with system time.

Try running "log file viewer" and using that as an assistant. It helps a bit by putting all available logs in front of you, and giving you the ability to only look at todays logs.

fabricator4
  • 8,375
0

Have you ever logged in to a gnome classic session? There is a bug in compiz which causes it to start extremely slowly if you do that even once and then go back to using unity:

https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1001138

The workaround is to edit ~/.config-bad1/compiz-1/compizconfig/config and delete the following lines:

[gnome_session]
profile =
-1

You could try choosing "Advanced Options for Ubuntu" In the boot loader, choose the recovery mode and It should show some information. Sometimes you have to be quick reading it

goeagles5
  • 1
  • 4
  • 2
    "Advanced Options" simply allows you to select which kernel to boot. It doesn't help find out what is actually being done during the boot operation. – fabricator4 Dec 08 '12 at 09:03
  • Ok because when my computer had a similar problem I used Advanced options I selected the recovery mode. Sorry I forgot to add that which i should of. It shows some information that way. – goeagles5 Dec 08 '12 at 14:40