[SOLVED] System Freeze on Ubuntu 12.04 64-bit

Disclaimer: this is by no means a one-size-fits-all solution for all similar bugs. There are various types of system freezes out there. The freeze mentioned in this post refers to one in which you can’t move the mouse cursor, you can’t do anything to make the system respond, which leaves you with none other than a hard reboot. 

Ubuntu users will know this — spending numerous (or seemingly endless) hours on sites such as Ubuntu Forums, Ask Ubuntu, OMG! Ubuntu, stackoverflow, to name a few, upon installing a new distro while looking for the best combination of settings, bug fixes or simply knowledge about Linux in general.

For many like us, the beauty of open-source operating systems lies in the joy of fixing broken things, be it incompatibility issues, kernel issues, power management issues and so on. In the past 3 years or so of using Ubuntu, Linux Mint, Arch Linux and Fedora, never once have I remembered having to tinker with kernels in order to get a problem fixed.

I recently got a Thinkpad E430 machine to replace my old Toshiba laptop which had served me well from 2008-2012. Within hours of getting the new laptop, I booted Ubuntu 12.04 LTS 64-bit on the 16-GB SSD meant for caching. After installing all the software packages I need and setting it up, a very annoying bug started to occur – the system froze completely at random times, most of the times while using Chrome browser. There was nothing I could do rather than doing a hard reset to overcome it, temporarily.

There’s no way it has to do with the RAM usage because I have 4 GB of RAM and 500 MB used as swap space for virtual memory. Then I read about Nvidia drivers not playing nice with different machines booting Ubuntu but that was not the issue for me too, as I did not install the proprietary beta drivers. I started to doubt whether the issue has to do with 64-bit. In my experience, 64-bit was never the ideal choice for me. Even with my previous machine having 4 GB of RAM and all, I was using Ubuntu 32 bit all along, for some reason I can’t really recall now.

I decided to update the kernel and if all else failed, I would boot the 32-bit version to see if there is a difference. Very fortunately kernel 3.4 was the perfect solution; I’ve been postponing this post because I wanted to make sure the freeze is completely gone, which it is after 5 days on the new kernel. Ubuntu 12.04 LTS ships with Linux kernel 3.2. The latest available kernel for Precise Pangolin is kernel 3.4.

First thing first, just do a check of which kernel you’re currently running. It’s supposed to show you 3.2.0. Run the command uname -r

Next, go to the index of kernels to download all necessary .deb files for the new kernel you’re going to install., and click on v3.4-precise/ folder.

There are three files you need to download from the folder. Two amd64.deb packages + all.deb. For 32-bit, same thing – download two corresponding i386.deb packages + all.deb.

From here, you could just click on these debian packages one by one to install just like you would any software package. Or to save some time, use the command line to install all the packages at once. Navigate to the folder to which your files are downloaded; in my case it’s the default Downloads folder.

Run the command  sudo dpkg -i linux*.deb and wait for the installation to complete. After it’s done, close the terminal and reboot your system. In the GRUB menu, you should be able to see the kernel being updated to 3.4.0 generic. You could always double check though by using uname -r command again when you’re logged back in.

There is one last thing to do after the system is rebooted, i.e. to remove the files related 3.2 kernel. Open up your Synaptic Package Manager (if you don’t have it installed yet, sudo apt-get update, sudo apt-get upgrade, sudo apt-get install synaptic), type “linux” into the Quick filter box and make sure to remove the generic kernel files related to 3.2 (Mark for Removal, Apply).

That’s all for updating Ubuntu 12.04 LTS to run kernel 3.4. The new kernel does come with a noticeably better power management and of course better stability. Hope this post helps you in some way. Enjoy!

[FIX] YouTube videos do not play fullscreen in Chrome on Ubuntu 12.04

It’s taken me long enough to be utterly annoyed by this bug and got down to find a fix. The bug is this – when I want to play a YouTube video full-screen, it works perfectly fine if I click full-screen button for the first time. However, let’s say for example I pause the video, switch back to normal screen and make it full-screen again, the video wouldn’t play anymore. For sure, it’s the problem with the infamous Flash player which has taken a long time to be finally of acceptable standard on Linux.

The fix is surprisingly easy. Just go to your Chrome address bar, type chrome://plugins and hit enter; you’ll be led to the following page.

Click on “Details” button on the right side and you’ll see two versions of Flash currently available on your Chrome. Just make sure you disable the version number 11.3 and enable the version 11.2. Now reload the videos and enjoy! That did the trick for me.

How To Speed Up Ubuntu 12.04 with BleachBit

When Ubuntu 12.04 was released, I decided to give Unity another shot. I skipped 11.04, 11.10 and stayed with 10.04 LTS because of various bugs first found in Unity. Ubuntu has actually become my main OS and daily driver since 2009, so stability and maintenance mean a lot to me. To my surprise, I actually like the way 12.04 works after just playing with it for a few hours.

There was one problem with 12.04, though, that I didn’t face when I was using 10.04 for close to a year. The OS actually became very laggy almost to the point of me doubting if one of my RAM sticks has stopped working. I came across a software called BleachBit after doing a bit of research regarding speeding up Ubuntu and freeing up some disk spaces. The best part? It’s free and open-source. You can install simply by calling up your Terminal (Ctrl + Alt + T) and type sudo apt-get install bleachbit.

Once it is done installing, open up your Dash and look for BleachBit and choose to run it as Root.

Now, check the options that you wish to clean on the left side of the screen. As you tick along the way, many warnings will pop up informing you what each option will clean. DO read them very carefully. It’s good to know which part of your system is being wiped.

After checking everything, just click clean and wait for the process to complete. The whole process takes about 45 minutes to 1 hour depending on how cluttered your system is. It is advisable to close all your programs and let it run in peace, so make sure you have ample time before you run BleachBit.

For me, the process helped me clear up to 60 GB of disk space and my Ubuntu 12.04 is running as snappy as a fresh install. Do give it a try to see the difference.

If you are unsatisfied with the boot time even after “bleaching” your system, open “Startup Applications” and disable any unwanted apps and services at startup.

Despite saying Ubuntu is my daily driver, I still have Windows 7 installed on my other partition, mainly for Microsoft Office and gaming purposes. Or when there’s a mainstream software I have to run on Windows, I would always have a safety net to fall back upon. If you’re looking to dual-boot Ubuntu 12.04 and Windows 7, I am afraid it’s not as straightforward as the previous versions, so you might want to check out this tutorial and follow every step closely.