Fixing Random freezes in Ubuntu 8.04

Icebergs in GreenlandUpdate - June 24, 2008

I’ve disabled the comments feature for this particular post. People have been posting comments about their own experiences with this freezing behaviour.

It would appear that it is most commonly caused by video driver issues. However, I can’t provide technical support for Ubuntu on this blog, and freezes can be caused by any number of problems. This post was really just about my experiences and what fixed it for me.

If you are experiencing these types of issues, my suggestion is to post your question at the Ubuntu Forums website.

Original Post:

I’ve been using the Ubuntu Linux 8.04 release (Hardy Heron) for a while now. Lately I’ve been experiencing this really odd behaviour. While using OpenOffice.org applications, like Writer, if I swapped between the OpenOffice.org window and the window of another application, sooner or later my entire system would freeze. At the time the only thing I could do was turn it off, and then turn it back on again. The severe downside of this was that I’d typically lose any unsaved work.

I did some investigating on the Internet and stumbled across this post in the OpenOffice.org Community Forum. While I disagree with the idea of replacing the Ubuntu supplied OpenOffice.org packages with ones from another source, it did confirm that other people have been experiencing this type of issue.

So I wasn’t alone, which is encouraging in an odd sort of way while you’re trying to solve an issue you’re experiencing. It neatly answers the “Is it just me?” question.

Further investigation turned up this post on the Compiz Fusion Forum. What it suggests is that there is a potential issue with the proprietary NVidia drivers and the Focus Animation and potentially the Water Effect plugins.

To change the Compiz Fusion settings I followed this procedure:

  1. Click the System main menu item
  2. Click the Preferences sub menu item
  3. Click the Advanced Desktop Effect Settings menu item
  4. Click the Effects button under the Categories heading in the left hand pane
  5. Click the Animations button under the Effects heading in the right hand pane
  6. Click the Focus Animation tab
  7. Click the New button
  8. Leave all the options in the Edit window at their defaults and click the Close button
  9. Select any other entries in the Animation Selection list and click Delete button
  10. Close the CompizConfig Settings Manager window

If the Advanced Desktop Effect Settings menu item isn’t listed, ensure the compizconfig-settings-manager package is installed.

The other thing that the post mentioned is the Magic SysRq key, something I’ve never come across before. I did a search and found this article in Wikipedia. From the article:

The magic SysRq key is a key combination in the Linux kernel which, if the CONFIG_MAGIC_SYSRQ option was enabled at kernel compile time, allows the user to perform various low level commands regardless of the system’s state using the SysRq key. It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.

With this in mind, if it ever happens again, which it hasn’t based on my experiences so far. I should be able to get back to the system without forcing a reboot.

It is odd though that I only experienced this issue when using the OpenOffice.org applications. Which would seem to suggest the problem I was experiencing is more subtle than just an issue with drivers and Compiz Fusion.

The photo “Icebergs in Greenland” was uploaded to Flickr by Nick Russill and found using the everystockphoto.com search engine.

Posted in Linux, Musings. Tags: , , , .

17 Responses to “Fixing Random freezes in Ubuntu 8.04”

  1. Elizabeth Greene Says:

    Hi. I had a similar problem on Heron last week. I noticed that the Hard Drive activity light was locking on when it occurred, but running top showed that the system wasn’t going into swap. I ran dmesg and found the culprit, my SATA hard drive was failing and the system was resetting it when it stopped responding.

    Hew HDD, happy heron.

    If you still have Compiz enabled, check out (window)-E as a desktop switcher, or the zoom feature with (window)-Mouse scroll up/Mouse scroll down.

    -ellie

  2. Greg Says:

    This has been a big issue for the last year for me, since Feisty and maybe longer for others. There is a massive thread on this at ubuntuforums.org, the conclusion still being that there is no answer. The culprit seems to be the nvidia drivers. Once I rolled back to the previous driver the problem all but went away. I’m having trouble rolling back to the previous version now in Hardy.

    The freeze shows up for me in two ways. First, sometimes when I use the scrolling mouse wheel using Firefox. The other is exactly as you described, when I click away from Open Office word processor.

    I tried removing the compiz focus animation as you said, hopefully it will help.

    Here’s a link to the thread.
    http://ubuntuforums.org/showthread.php?t=587905

  3. landeel Says:

    HP DV6000 laptop, 1 GB RAM, GeForce 6150. Running with noapic irqpoll noirqdebug, otherwise I can’t even get to xorg.
    Just upgraded from 7.10 to 8.04 (AMD64) and my system started freezing. Never happened before with 7.10.
    It always freezes when I’m playing SDLMAME. Happened once listening to music with amarok. The cursor freezes and the sound loops. The only thing I can do is power off the system.
    I think it’s related to NVIDIA drivers and Kernel 2.6.24. I’ve tried running with NV drivers and it doesn’t seem to freeze. Running hardy with Kernel 2.6.22 didn’t freeze either.

    So I got my system stable again by downgrading to kernel 2.6.22-14 . This is how I did it:

    1- I had kernel 2.6.22-14 previously installed because I have upgraded from 7.10 to 8.04. So I just changed 2.6.22-14 to be the default again in ‘/boot/grub/menu.1st’.

    2- Commented out ‘blacklist bcm43xx’ from ‘/etc/modprobe.d/blacklist’ , and added ‘blacklist b43′, so I can get my wireless card to work again with the older kernel.

    3- NVIDIA drivers: this was the hardest part to figure out, as everything I’ve tried before failed miserably. I have manually downloaded ‘nvidia-glx-new_100.14.19+2.6.22.4-14.9_amd64.deb’ and ‘linux-restricted-modules-2.6.22-14-generic_2.6.22.4-14.9_amd64.deb’
    Then did a ’sudo dpkg -i –force-all *.deb’. DANGEROUS! It will give a few broken dependencies, so do it at your own risk.

    So I have played SDLMAME for a few hours now, and I haven’t experienced any more freezes. I hope everything is stable now.
    One thing is for sure: I’m not upgrading my kernel anytime soon.

  4. techxplorer Says:

    Many thanks for your comments everyone.

  5. tomsen Says:

    I just upgraded to hardy 8.04. I am on an ATI radeon and use the open driver. X freezes when I am in thunderbird writing mail. two times now, am really pissed :-( 7.10 was always rock-solid.

  6. Tola Says:

    8.04 freezes.
    I dont have Nvidia, and it didint affect me through Open office but when Installing (twice) and then when downloading a picture.

    These are my first steps with Linux, if the issue continues I will try another dsictribuition…

  7. techxplorer Says:

    @Tola,

    My suggestion, before abandoning the distribution, would be to check the Ubuntu Forums.

    Post your questions there, with as much detail as possible, and see if someone has a resolution to the problem.

  8. Rafael Says:

    I’m using a Shuttle Computer with an nVidia GeForce 7025 / nForce 630a chipset. It’s a 64 bit AMD Athlon X2.

    As soon as I installed the nVidia drivers (downloaded them from the nVidia page) the computer begun to freeze, and the freezing stopped when I uninstalled the drivers (wich annoys me, because the max resolution is 800×600).

    Any ideas or directions to look for?

  9. techxplorer Says:

    @Rafael,

    Apologies for the delay in reply.

    My first suggestion would be to use the NVIDIA drivers that come from Ubuntu using the ‘Hardware Drivers’ application and not the NVIDIA drivers from the NVIDIA website.

    My second suggestion would be to post at the Ubuntu Forums website and see if anyone else is experiencing the same type of issue.

    My third suggestion would be to see if using the Metacity window manager and not Compiz helps.

  10. Roy Kimbrell Says:

    I tried running 8.04 on a Sony Vaio (VGN-A270P) by upgrading from 7.10. 7.10 was stable and worked well. It does NOT use the nvidia driver - it uses the ATA (fglrx). The system would freeze after 5 or 10 minutes - no response from the keyboard including ctrl-alt-del and ctrl-alt-backspace. Power-off was all it understood. I have a Wacom tablet. Plugging that in (either before or after boot) would lead to a freeze in a minute or two. This does not occur on 7.10, but the tablet does get flakey after awhile. I’ve confirmed this behavior in the live CD.

  11. Roy Kimbrell Says:

    Well, to add a bit more, I went back to 7.10 by reinstalling from CD and restoring my files from a backup. I ran the live CD for 8.04 after I had moved back to 7.10.

  12. Tyler Says:

    8.04 freezes all the time. It’s the worst Distro yet. Unfortunately, my Desktop uses a Netgear MA111 adapter, and 7.10 doesn’t come with stuff to support my adapter, so I can’t get internet, so I’m stuck with a crappy distro.

  13. techxplorer Says:

    @ Roy & Tyler

    I’m sorry to hear that you’re having so much trouble with Ubuntu. My only suggestion is to:

    Put a post in at the Ubuntu Forums website and see if anyone else is experiencing the same type of issue.

    I to have a Wacom tablet, a Bamboo, and I’ll certainly be keeping an eye out for the issues that you’ve outlined as well.

    If all else fails there are many other distributions available that may work better.

  14. Abhinav Says:

    I am also having this freezing problem with my UBUNTU 8.04. I am new to UBUNTU and quite confused with this problem. I noticed one common trend amongst all the freezes on my system that the freeze occurs only when I am running 4 or more programs simultaneously like Firefox,VLC, and others and now if I try to open a 5th or 6th program then it freezes.
    I thought that this was due to my system’s low RAM(only 512 mb) and also because i did not create any swap partition at the time of installation. But here seeing that others also experience similar problems….I am aagain confused?
    Seems like another freeze is coming

  15. Alex Says:

    I am experiencing Ubuntu 8.04 lockups with my new system, too. Yes, there is an nVidia based ASUS graphics card there…

    No, no lockup when running Vista on same exact hardware.

    Full description of my problem can be found here:

    http://tinyurl.com/458she

  16. Alex Says:

    Update: problem seems to have been solved by enabling the NVIDIA restricted driver. Using 8GB RAM, PS/2 mouse, Compiz, OOo and 3GB/s SATA all together without any problem. I am happy. :-)

  17. techxplorer Says:

    @Alex,

    I’m glad you’ve sorted out your issues.