Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been using Ubuntu 11.10 for a month or so. In the last week it's started freezing randomly (every few hours or minutes). I can still move the mouse and switch to other terminals with ctrl+alt.

I thought this was purely a gui issue as I could continue entering commands (mouse clicks and keys) which seem to be processed once the system resumes (generally 30 seconds to a few minutes). I'm using gnome and metacity.

I can't identify anything in particular that triggers the freezes. Saving a file in LibreOffice causes the system to hang. I tried disabling most of the services I've installed (dropbox, autokey, etc.) but doesn't help.

Switching to another terminal and running top, the CPU column is shared equally among all of my processes (i.e. non-root). I have no idea what that signifies. My PC is unusable in this state.

CPU model name : Pentium(R) Dual-Core CPU E6700 @ 3.20GHz

[7m  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                            [0;10m[39;49m[K
[0;10m[0;10m 1499 ogga      20   0  404m  32m  13m R   10  0.8   0:28.19 python                                                                                             [0;10m[39;49m
[0;10m[0;10m 1501 ogga      20   0  216m  13m 6224 R   10  0.3   0:18.28 ibus-x11                                                                                           [0;10m[39;49m
[0;10m[0;10m 1679 ogga      20   0  449m  34m  15m R   10  0.9   0:41.10 gnome-panel                                                                                        [0;10m[39;49m
[0;10m[0;10m 1710 ogga      20   0  350m  15m 8324 R   10  0.4   0:18.25 bluetooth-apple                                                                                    [0;10m[39;49m
[0;10m[0;10m 1752 ogga      20   0  458m  37m  13m R   10  0.9   0:22.62 autokey-gtk                                                                                        [0;10m[39;49m
[0;10m[0;10m 2081 ogga      20   0  354m  17m 9800 R   10  0.5   0:16.36 update-notifier                                                                                    [0;10m[39;49m
[0;10m[0;10m 5439 ogga      20   0  640m 104m  38m R   10  2.6   0:45.17 chromium-browse                                                                                    [0;10m[39;49m
[0;10m[0;10m 5586 ogga      20   0  381m  42m  21m R   10  1.1   0:20.17 chromium-browse                                                                                    [0;10m[39;49m
[0;10m[0;10m 6422 ogga      20   0  529m  59m  18m R   10  1.5   0:28.15 sublime_text                                                                                       [0;10m[39;49m
[0;10m[0;10m 1362 ogga      20   0  264m  14m 7884 R    8  0.4   0:18.29 gnome-session                                                                                      [0;10m[39;49m
[0;10m[0;10m 1673 ogga      20   0  351m  17m 9768 R    8  0.4   0:21.78 metacity                                                                                           [0;10m[39;49m
[0;10m[0;10m 1708 ogga      20   0  249m  13m 7156 R    8  0.3   0:18.23 gnome-fallback-                                                                                    [0;10m[39;49m
[0;10m[0;10m 1709 ogga      20   0  572m  28m  15m R    8  0.7   0:18.37 nautilus                                                                                           [0;10m[39;49m
[0;10m[0;10m 1722 ogga      20   0  467m  18m   9m R    8  0.5   0:18.43 nm-applet                                                                                          [0;10m[39;49m
[0;10m[0;10m 1727 ogga      20   0  225m  12m 6304 R    8  0.3   0:18.24 polkit-gnome-au                                                                                    [0;10m[39;49m
[0;10m[0;10m 1731 ogga      20   0  422m  19m  10m R    8  0.5   0:26.62 gnome-sound-app                                                                                    [0;10m[39;49m
[0;10m[0;10m 1735 ogga      20   0  306m  31m  13m R    8  0.8   0:18.37 python                                                                                             [0;10m[39;49m
[0;10m[0;10m 1754 ogga      20   0  286m  16m 8912 R    8  0.4   0:18.90 vino-server                                                                                        [0;10m[39;49m
[0;10m[0;10m 1798 ogga      20   0  246m  15m 7476 R    8  0.4   0:18.25 gnome-screensav                                                                                    [0;10m[39;49m
[0;10m[0;10m 1851 ogga      20   0  185m  14m 7256 R    8  0.4   0:18.18 gdu-notificatio                                                                                    [0;10m[39;49m
[0;10m[0;10m 1923 ogga      20   0  251m  28m  11m R    8  0.7   0:17.96 applet.py                                                                                          [0;10m[39;49m
[0;10m[0;10m 4085 ogga      20   0  378m  22m  11m R    8  0.6   0:18.19 gnome-terminal                                                                                     [0;10m[39;49m
[0;10m 4213 ogga      20   0  263m  73m  15m S    2  1.9   3:57.44 skype                                                                                              [0;10m[39;49m
[0;10m    1 root      20   0 24188 1492 1320 S    0  0.0   0:00.45 init                                                                                               [0;10m[39;49m
[0;10m    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                                                                                           [0;10m[39;49m
[0;10m    3 root      20   0     0    0    0 S    0  0.0   0:02.27 ksoftirqd/0                                                                                        [0;10m[39;49m
[0;10m    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0                                                                                        [0;10m[39;49m
[0;10m    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1                                                                                        [0;10m[39;49m
[0;10m    9 root      20   0     0    0    0 S    0  0.0   0:01.97 ksoftirqd/1                                                                                        [0;10m[39;49m
[0;10m   10 root      20   0     0    0    0 S    0  0.0   0:01.16 kworker/0:1                                                                                        [0;10m[39;49m
[0;10m   11 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                                                                                             [0;10m[39;49m
[0;10m   12 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                                                                                            [0;10m[39;49m
[0;10m   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                                                                                              [0;10m[39;49m
[0;10m   15 root      20   0     0    0    0 S    0  0.0   0:00.00 sync_supers                                                                                        [0;10m[39;49m
[0;10m   16 root      20   0     0    0    0 S    0  0.0   0:00.00 bdi-default                                                                                        [0;10m[39;49m
[0;10m   17 root       0 -20     0    0    0 S    0  0.0   0:00.00 kintegrityd                                                                                        [0;10m[39;49m
[0;10m   18 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd                                                                                            [0;10m[39;49m
[0;10m   19 root       0 -20     0    0    0 S    0  0.0   0:00.00 ata_sff                                                                                            [0;10m[39;49m
[0;10m   20 root      20   0     0    0    0 S    0  0.0   0:00.00 khubd                                                                                              [0;10m[39;49m
[0;10m   21 root       0 -20     0    0    0 S    0  0.0   0:00.00 md                                                                                                 [0;10m[39;49m
[0;10m   23 root      20   0     0    0    0 S    0  0.0   0:00.00 khungtaskd                                                                                         [0;10m[39;49m
[0;10m   24 root      20   0     0    0    0 S    0  0.0   0:00.14 kswapd0                                                                                            [0;10m[39;49m
[0;10m   25 root      25   5     0    0    0 S    0  0.0   0:00.00 ksmd                                                                                               [0;10m[39;49m
[0;10m   26 root      39  19     0    0    0 S    0  0.0   0:00.00 khugepaged                                                                                         [0;10m[39;49m
[0;10m   27 root      20   0     0    0    0 S    0  0.0   0:00.00 fsnotify_mark                                                                                      [0;10m[39;49m
[0;10m   28 root      20   0     0    0    0 S    0  0.0   0:00.00 ecryptfs-kthrea                                                                                    [0;10m[39;49m
[0;10m   29 root       0 -20     0    0    0 S    0  0.0   0:00.00 crypto                                                                                             [0;10m[39;49m
[0;10m   37 root       0 -20     0    0    0 S    0  0.0   0:00.00 kthrotld                                                                                           [0;10m[39;49m
[0;10m   38 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                                                          [0;10m[39;49m
[0;10m   39 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_1                                                                                          [0;10m[39;49m
[0;10m   41 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_2                                                                                          [0;10m[39;49m
[0;10m   42 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_3                                                                                          [0;10m[39;49m
[0;10m   64 root      20   0     0    0    0 S    0  0.0   0:02.98 kworker/0:2                                                                                        [0;10m[39;49m
[0;10m  242 root      20   0     0    0    0 S    0  0.0   0:00.39 jbd2/sdb1-8                                                                                        [0;10m[39;49m
[0;10m  243 root       0 -20     0    0    0 S    0  0.0   0:00.00 ext4-dio-unwrit                                                                                    [0;10m[39;49m
[0;10m  288 root      20   0 17236  448  448 S    0  0.0   0:00.04 upstart-udev-br                                                                                    [0;10m[39;49m
[0;10m  295 root      20   0 21752  884  796 S    0  0.0   0:00.06 udevd              

And at another time:

[7m  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                            [0;10m[39;49m[K
[0;10m[0;10m 1757 ogga      20   0  222m 9932 6300 R   13  0.2   0:05.69 polkit-gnome-au                                                                                    [0;10m[39;49m
[0;10m[0;10m 1559 ogga      20   0  152m 9764 6112 R   13  0.2   0:05.77 ibus-x11                                                                                           [0;10m[39;49m
[0;10m[0;10m 1786 ogga      20   0  457m  33m  13m R   13  0.9   0:06.10 autokey-gtk                                                                                        [0;10m[39;49m
[0;10m[0;10m 1395 ogga      20   0  262m  12m 7880 R   12  0.3   0:05.88 gnome-session                                                                                      [0;10m[39;49m
[0;10m[0;10m 1557 ogga      20   0  403m  31m  13m R   12  0.8   0:14.95 python                                                                                             [0;10m[39;49m
[0;10m[0;10m 1745 ogga      20   0  247m  11m 7196 R   12  0.3   0:05.69 gnome-fallback-                                                                                    [0;10m[39;49m
[0;10m[0;10m 1767 ogga      20   0  237m  26m  11m R   12  0.7   0:05.87 python                                                                                             [0;10m[39;49m
[0;10m[0;10m 1713 ogga      20   0  440m  25m  13m R   12  0.6   0:13.76 gnome-panel                                                                                        [0;10m[39;49m
[0;10m[0;10m 1747 ogga      20   0  348m  13m 8328 R   11  0.3   0:05.22 bluetooth-apple                                                                                    [0;10m[39;49m
[0;10m[0;10m 1754 ogga      20   0  465m  16m  10m R   11  0.4   0:05.21 nm-applet                                                                                          [0;10m[39;49m
[0;10m[0;10m 1710 ogga      20   0  167m  11m 7564 R   11  0.3   0:05.21 metacity                                                                                           [0;10m[39;49m
[0;10m[0;10m 1761 ogga      20   0  406m  17m 9928 R   11  0.4   0:12.71 gnome-sound-app                                                                                    [0;10m[39;49m
[0;10m[0;10m 1789 ogga      20   0  283m  13m 8852 R   11  0.3   0:05.55 vino-server                                                                                        [0;10m[39;49m
[0;10m[0;10m 1815 ogga      20   0  243m  11m 7452 R   11  0.3   0:05.17 gnome-screensav                                                                                    [0;10m[39;49m
[0;10m[0;10m 1885 ogga      20   0  182m  11m 7256 R   11  0.3   0:05.18 gdu-notificatio                                                                                    [0;10m[39;49m
[0;10m[0;10m 1957 ogga      20   0  249m  25m  11m R   11  0.7   0:05.32 applet.py                                                                                          [0;10m[39;49m
[0;10m[0;10m 2067 ogga      20   0  260m  12m 7828 R   11  0.3   0:05.21 update-notifier                                                                                    [0;10m[39;49m
[0;10m 1975 ogga      20   0  292m  48m  11m S    0  1.2   0:08.28 ubuntuone-syncd                                                                                    [0;10m[39;49m
[0;10m[0;10m 2363 ogga      20   0 21468 1384  988 R    0  0.0   0:00.01 top                                                                                                [0;10m[39;49m
[0;10m    1 root      20   0 24284 2296 1320 S    0  0.1   0:00.46 init                                                                                               [0;10m[39;49m
[0;10m    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                                                                                           [0;10m[39;49m
[0;10m    3 root      20   0     0    0    0 S    0  0.0   0:00.05 ksoftirqd/0                                                                                        [0;10m[39;49m
[0;10m    4 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/0:0                                                                                        [0;10m[39;49m
[0;10m    5 root      20   0     0    0    0 S    0  0.0   0:00.19 kworker/u:0                                                                                        [0;10m[39;49m
[0;10m    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0                                                                                        [0;10m[39;49m
[0;10m    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1                                                                                        [0;10m[39;49m
[0;10m    8 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/1:0                                                                                        [0;10m[39;49m
[0;10m    9 root      20   0     0    0    0 S    0  0.0   0:00.06 ksoftirqd/1                                                                                        [0;10m[39;49m
[0;10m   10 root      20   0     0    0    0 S    0  0.0   0:00.09 kworker/0:1                                                                                        [0;10m[39;49m
[0;10m   11 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                                                                                             [0;10m[39;49m
[0;10m   12 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                                                                                            [0;10m[39;49m
[0;10m   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                                                                                              [0;10m[39;49m
[0;10m   14 root      20   0     0    0    0 S    0  0.0   0:00.25 kworker/u:1                                                                                        [0;10m[39;49m
[0;10m   15 root      20   0     0    0    0 S    0  0.0   0:00.00 sync_supers                                                                                        [0;10m[39;49m
[0;10m   16 root      20   0     0    0    0 S    0  0.0   0:00.00 bdi-default                                                                                        [0;10m[39;49m
[0;10m   17 root       0 -20     0    0    0 S    0  0.0   0:00.00 kintegrityd                                                                                        [0;10m[39;49m
[0;10m   18 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd                                                                                            [0;10m[39;49m
[0;10m   19 root       0 -20     0    0    0 S    0  0.0   0:00.00 ata_sff                                                                                            [0;10m[39;49m
[0;10m   20 root      20   0     0    0    0 S    0  0.0   0:00.00 khubd                                                                                              [0;10m[39;49m
[0;10m   21 root       0 -20     0    0    0 S    0  0.0   0:00.00 md                                                                                                 [0;10m[39;49m
[0;10m   22 root      20   0     0    0    0 S    0  0.0   0:00.22 kworker/1:1                                                                                        [0;10m[39;49m
[0;10m   23 root      20   0     0    0    0 S    0  0.0   0:00.00 khungtaskd                                                                                         [0;10m[39;49m
[0;10m   24 root      20   0     0    0    0 S    0  0.0   0:00.00 kswapd0                                                                                            [0;10m[39;49m
[0;10m   25 root      25   5     0    0    0 S    0  0.0   0:00.00 ksmd                                                                                               [0;10m[39;49m
[0;10m   26 root      39  19     0    0    0 S    0  0.0   0:00.00 khugepaged                                                                                         [0;10m[39;49m
[0;10m   27 root      20   0     0    0    0 S    0  0.0   0:00.00 fsnotify_mark                                                                                      [0;10m[39;49m
[0;10m   28 root      20   0     0    0    0 S    0  0.0   0:00.00 ecryptfs-kthrea                                                                                    [0;10m[39;49m
[0;10m   29 root       0 -20     0    0    0 S    0  0.0   0:00.00 crypto                                                                                             [0;10m[39;49m
[0;10m   37 root       0 -20     0    0    0 S    0  0.0   0:00.00 kthrotld                                                                                           [0;10m[39;49m
[0;10m   38 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                                                          [0;10m[39;49m
[0;10m   39 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_1                                                                                          [0;10m[39;49m
[0;10m   40 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/u:2                                                                                        [0;10m[39;49m
[0;10m   41 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_2                                                                                          [0;10m[39;49m
[0;10m   42 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_3                                                                                          [0;10m[39;49m
[0;10m   43 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/u:3                                                                                        [0;10m[39;49m
[0;10m   44 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/u:4                                                                                        [0;10m[39;49m
[0;10m   45 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/u:5                                                                                        [0;10m[39;49m[6;1H[K

Sorry about the horrible formatting. Thanks for any suggestions...

Edit: I notice that my virtual computer (win7 64 on virtualbox) continues to respond most of the time during these 'freezes'

Edit2: I suspect this is something to do with UI priority being too low... but I don't know enough about linux to know how to address that.

share|improve this question

closed as off topic by jrg May 21 '12 at 20:35

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What is your drive type ? –  jflaflamme Mar 31 '12 at 12:54
    
This question should instead be filed as a bug report, thanks! Instructions here. –  Jorge Castro Apr 26 '12 at 2:43

1 Answer 1

I noticed the same on one of my desktop computer. My laptop doesn't suffer from this. Both have the last version of ubuntu.

The problem you described just happened to me today, googling on the subject pointed me here, so i tried to strace to see what was happening ...

My desktop PC have a ssd drive with async,discard and noatime options in the fstab.

Result of the strace

I think there is an issue with the clock on gnome-shell and maybe a cache issue.

With the gnome-shell pid :

# sudo strace -e open -p 16725
Process 16725 attached - interrupt to quit
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32
open("/etc/localtime", O_RDONLY)        = 32

Yes, one read every second !

The clock ?

I was showing the seconds in my gnome-shell title bar, i thought it was that. Obviously not. Then i completly removed the clock from the title bar, because i was still having gnome-shell reading /etc/localtime every second.

How to remove clock from panel in gnome-shell?

Once the clock was visually removed, same problem. Turned off all tweaks in gnome-tweak-tool, same problem.

Since the file is still read every second, it may cause a sort of buffer issue with the hard drive which may cause the freeze. (I think).

EDIT: Hint ? http://stackoverflow.com/questions/4554271/how-to-avoid-excessive-stat-etc-localtime-calls-in-strftime-on-linux

Switched back to unity

In addition to the freezes, this bug is a real hard drive killer if you are not using the noatime option in your fstab. (see ref1 and ref2)

This is why i just switched back to the default ubuntu desktop, unity. I can't afford to loose my SSD drive while a fix is found.

No more freezes for now

But to answer, I do not have the issue anymore, pointing the guilt on gnome-shell for now.

Hope this helps

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.