Ubunut Intrepid - Clocksource From Hell
Sunday, December 7, 2008 8:44:07 PM
So, this is my second time trying to write this article. I'm sad to say the issue I thought was the cause was not the only culprit. I am happy to report now though that everything is stable, and I'm pretty pleased witht the overall progress of my Desktop coming together. I should probably explain that there is a pretty major issue with the clocksource Ubuntu is using, hpet. This particular clocksource was the cause of my system freezing every ten minutes or so. To be totally honest, it could have been the issue in Core 10 as well, but I was less tolerant with Core 10 and did not check the logs, so there is no way for me to be sure. To see if the clocksource is the cause of the issue on your system is simple. Navigate your way to [menu] -> System -> Administration -> System Log. If you look at the messages or kern.log sections and search for "hpet" (no quotes) and see results like this filling the page:
That's a good indicator that hpet is the cause of the issue, or at least a factor.
Now then, for a short guide and an explanation ;]
So how do we get our system stable? Or hopefully bring it a step closer to stability? Well, it's a pretty simple process.
WARNING: I can not stress this enough, you will be modifying critical system files. If something goes wrong, I take no responsibility. Again, if your system gets hosed because you followed this guide, I am not responsible
With that warning out of the way, I'd like to say, that no matter what, unless your system freezes in the midst of us updating the bootloader or something catastrophic like that happpens, your system should be fine.
On to the solution.
The first thing we need to do, is become root. Run the following command:
Enter in your password. Now you should see something similar to the following:
Now that we're root we'll start applying the fix. We first need to modify the bootloader, grub. To do this, run the following command:
Locate these two lines:
And modify them so that they look like this:
Now save and close the file and issue the following command to update the bootloader with the changes:
Lastly, issue the following command:
Type
If all went well, your system should no longer hang. If it still does, read my next post about FGLRX and how it may save the day.
I'd like to explain what exactly the "hpet=disable" option does. It tells the kernel to disable the HPET timer source and tell the kernel to use the PIT timer source instead. - That is according to this document Kernel Boot Command-Line Parameter Reference : pdf document
I'd like to also mention, that I had Googled this issue, and did see a resolution on one of the bug tracking websites, it was to use the option "clocksource=jiffies" however, this option caused my Xorg to unexplainably stop loading.
Notes:
Note 1: The important part here is that we see "root" this indicates that you have sucessfully become the administrator on your system.
Note 2: I issue the command gedit because I'm on the default Ubuntu install. If you were on Kubuntu it would be kate, and Xubuntu mousepad, respectively. Also, the command line tools vim or nano are always good options if you feel comfortable working in them.
Note 3: Your lines may not match exactly to mine. Again, just look for the key parts here, "# defoptions" and "# altoptions".
Note 4: This command is actually an optional "clean up" command, it removes the temporary file that was created while we were working in gedit. I mention to run it last in case you system hangs in the process of working on these files, if something goes terribly wrong, hopefully you'll have this backup copy until we no longer need it.
Goodluck and Happy Hacking ~
PiklesOnFire
Dec 6 15:47:13 P0F kernel: [ 163.857342] CE: hpet increasing min_delta_ns to 15000 nsec Dec 6 15:47:14 P0F kernel: [ 164.653250] CE: hpet increasing min_delta_ns to 22500 nsec Dec 6 15:50:18 P0F kernel: [ 348.432089] CE: hpet increasing min_delta_ns to 33750 nsec Dec 6 15:52:04 P0F kernel: [ 454.148092] CE: hpet increasing min_delta_ns to 50624 nsec Dec 6 15:52:59 P0F kernel: [ 509.009124] CE: hpet increasing min_delta_ns to 75936 nsec Dec 6 15:53:45 P0F kernel: [ 555.721382] CE: hpet increasing min_delta_ns to 113904 nsec
That's a good indicator that hpet is the cause of the issue, or at least a factor.
Now then, for a short guide and an explanation ;]
So how do we get our system stable? Or hopefully bring it a step closer to stability? Well, it's a pretty simple process.
WARNING: I can not stress this enough, you will be modifying critical system files. If something goes wrong, I take no responsibility. Again, if your system gets hosed because you followed this guide, I am not responsible
With that warning out of the way, I'd like to say, that no matter what, unless your system freezes in the midst of us updating the bootloader or something catastrophic like that happpens, your system should be fine.
On to the solution.
The first thing we need to do, is become root. Run the following command:
sudo -i
Enter in your password. Now you should see something similar to the following:
root@localhost:~#see note 1
Now that we're root we'll start applying the fix. We first need to modify the bootloader, grub. To do this, run the following command:
gedit /boot/grub/menu.lstsee note 2
Locate these two lines:
# defoptions=quiet splash
# altoptions=(recovery mode) singlesee note 3
And modify them so that they look like this:
# defoptions=quiet splash hpet=disable
# altoptions=(recovery mode) single hpet=disable
Now save and close the file and issue the following command to update the bootloader with the changes:
update-grub
Lastly, issue the following command:
rm /boot/grub/menu.lst~see note 4
Type
exitto drop from root, and restart your system.
If all went well, your system should no longer hang. If it still does, read my next post about FGLRX and how it may save the day.
I'd like to explain what exactly the "hpet=disable" option does. It tells the kernel to disable the HPET timer source and tell the kernel to use the PIT timer source instead. - That is according to this document Kernel Boot Command-Line Parameter Reference : pdf document
I'd like to also mention, that I had Googled this issue, and did see a resolution on one of the bug tracking websites, it was to use the option "clocksource=jiffies" however, this option caused my Xorg to unexplainably stop loading.
Notes:
Note 1: The important part here is that we see "root" this indicates that you have sucessfully become the administrator on your system.
Note 2: I issue the command gedit because I'm on the default Ubuntu install. If you were on Kubuntu it would be kate, and Xubuntu mousepad, respectively. Also, the command line tools vim or nano are always good options if you feel comfortable working in them.
Note 3: Your lines may not match exactly to mine. Again, just look for the key parts here, "# defoptions" and "# altoptions".
Note 4: This command is actually an optional "clean up" command, it removes the temporary file that was created while we were working in gedit. I mention to run it last in case you system hangs in the process of working on these files, if something goes terribly wrong, hopefully you'll have this backup copy until we no longer need it.
Goodluck and Happy Hacking ~
PiklesOnFire















Unregistered user # Monday, February 2, 2009 5:25:07 PM
PiklesOnFire # Monday, February 9, 2009 8:11:30 PM
Hope this helps.
PiklesOnFire
Unregistered user # Wednesday, February 11, 2009 3:59:37 PM
PiklesOnFire # Wednesday, February 11, 2009 11:20:23 PM
Very strange and nasty stuff.
PiklesOnFire
Unregistered user # Tuesday, May 5, 2009 12:19:49 AM
Unregistered user # Monday, June 8, 2009 10:38:17 PM
Unregistered user # Thursday, June 18, 2009 8:16:49 AM
Unregistered user # Monday, November 23, 2009 6:14:36 PM
Unregistered user # Monday, May 3, 2010 2:42:11 PM
Unregistered user # Thursday, May 6, 2010 7:43:00 PM
Unregistered user # Sunday, May 29, 2011 4:02:57 PM
Unregistered user # Wednesday, July 13, 2011 2:34:02 AM