Skip to content

Instantly share code, notes, and snippets.

@tobert
Created December 20, 2013 23:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tobert/8063382 to your computer and use it in GitHub Desktop.
Save tobert/8063382 to your computer and use it in GitHub Desktop.
Switching clock from TSC to HPET on Linux.
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ cat /proc/cpuinfo |grep 'model name' |head -n 1
model name : Intel(R) Xeon(R) CPU E31270 @ 3.40GHz
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ cat /proc/version
Linux version 3.11.4-gentoo (root@sysresccd) (gcc version 4.6.4 (Funtoo 4.6.4) ) #1 SMP Mon Oct 7 05:33:55
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ cat available_clocksource
tsc hpet acpi_pm
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ cat current_clocksource
tsc
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ echo hpet |sudo tee current_clocksource
hpet
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ cat current_clocksource
hpet
tobert@spaceghost /sys/devices/system/clocksource/clocksource0 $ dmesg |tail
...
[77309.795037] Switched to clocksource hpet
Copy link

ghost commented Jul 15, 2020

interesting article here about the tsc btw https://lwn.net/Articles/388188/

also I'm working on something you might find interesting https://gist.github.com/0x00002152/9ea3b1df8dfde3aa8b8ba2f42463b0b7

@tobert
Copy link
Author

tobert commented Jul 15, 2020

Thanks! Your gist was interesting and I like how you pulled all the tools out of the toolbox.

I read the TSC article a while back. A lot has changed since that article :)

@apokrell
Copy link

Thanks! Your gist was interesting and I like how you pulled all the tools out of the toolbox.

I read the TSC article a while back. A lot has changed since that article :)

hi tobert, i am new in linux , and i am tryng to switch from tsc to hpet using your guide , but I couldnt complete the process, a lot of messages , errors etc, plse what can I do , thank you, I have linux mint and the hpet is present in my system , , but i cant enable it, in the bios is hidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment