# TSC-low as timecounter slows system clock by a factor of 4



## Deleted member 35650 (Dec 8, 2018)

Hi,

I encountered a problem on my Mini Pc (used as an opnsense server), where the time was being very slow. top updated quite slowly, and I noticed the system showing a current time of 5PM when it was midnight.
A sleep 1 took 4 seconds, I only tested the behaviour while the machine was performing a CPU heavy task (compiling).

I fixed the issue using kern.timecounter.hardware="HPET", since the problem was likely the TSC-low timecounter being wrong.
This issue seems to have been fixed by this commit https://lists.freebsd.org/pipermail/svn-src-head/2011-June/028697.html
My machine reports having invariant TSC (kern.timecounter.invariant_tsc), but had issues when using it... C3 state is enabled.

Is there a way to check CPU feature flags to check if the CPU reports having an invariant TSC?
Am I right in thinking this is the issue, or could this be something else?

Is there a better way to fix this issue, where I can only give TSC-low a negative priority (used when timer is broken), so that the system can pick the timer it wants ? (Without hardcoding it into the kernel myself)

Using 11.1-RELEASE-p15 (I know it's OOL) on a N4100 processor (https://ark.intel.com/products/128983/Intel-Celeron-N4100-Processor-4M-Cache-up-to-2-40-GHz-)

Thanks!


----------



## Deleted member 35650 (Dec 24, 2018)

Problems occurs even when switching from HPET back to TSC-low, on FreeBSD 11.2. I can see tmux's clock being slower than normal by half.


----------

