Another look at HPET High Precision Event Timer

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by Bukkake, Sep 18, 2012.

  1. janos666

    janos666 Maha Guru

    Messages:
    1,037
    Likes Received:
    171
    GPU:
    MSI RTX3080 10Gb
    Linux defaults to HEPT (which get marked as unstable during boot unless C-states are disabled to keep it stable) on Intel Core2. It prefers that over ACPI PM.
     
  2. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,947
    Likes Received:
    4,036
    GPU:
    GTX 1080ti
    I don't see any evidence of this, Linux message boards seem to explicitly prefer TSC over hpet
     
  3. janos666

    janos666 Maha Guru

    Messages:
    1,037
    Likes Received:
    171
    GPU:
    MSI RTX3080 10Gb
    TSC is unreliable on some old processors. Some need all kinds of power saving features disabled (like SpeedStep) to make it stable, some only need C states disabled (actually, only some deep C-states but technically it's not possible to control that with fine granularity on old CPUs during boot with built-in functions, so it's all or nothing unless you can configure them in the BIOS Setup gradually).
     
  4. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,947
    Likes Received:
    4,036
    GPU:
    GTX 1080ti
    There were particular revisions of core processors with busted TSC, they weren't the rule though.
     

  5. Cyberdyne

    Cyberdyne Ancient Guru

    Messages:
    3,582
    Likes Received:
    301
    GPU:
    2080 Ti FTW3 Ultra
    Also this ancient use case it utterly useless. What's the argument here, hpet tweaks are valid on your computer because look at these over a decade old processors?
     
  6. Groot

    Groot Member

    Messages:
    26
    Likes Received:
    4
    GPU:
    GTX 1080
    I responded to your question
    If you feel the article from 2 years ago almost to the day for a system that was launched less than 3 years ago doesn't qualify because it's too old then fine. Probably will not want to read any further as my system is older than that.

    I have never seen LAPIC used as a counter, only as a timer. The case of non-invariant CPU is related to counters only and not relevant for timers.

    Maybe a picture will help explain. This is default setting for W7 x64 SP1 on Z97. HPET here consists of eight timers and one counter.
    [​IMG]
    While the TSC is used as the performance counter the tick timer is derived from HPET which in this case at a clock frequency of 14318180Hz would typically give a maximum timer resolution of 0.5000635... which truncated gives 0.5000ms

    Here's W10 x64 1703 default + hyper-V off
    [​IMG]
    Now the timer is running LAPIC at a clock of 781248Hz which with a timer resolution of 0.5ms set in this case would give 391/781248 = 0.500481... or 0.5004 when truncated. If 390 where used instead it would be 0.4992 truncated. Of course for this setup it's dependent on BCLK and Windows calculations.

    I forget where I put my W10 x64 1909 screenshots, perhaps they were deleted but found this one from when I tested the useplatformtick option with synthetic timers.
    [​IMG]
    This was with useplatformtick set to no. You can see a synthetic timer being used and LAPIC reported at BCLK rate due to Windows using the smallest divider. Timer resolution would be very close to 0.5 because of this. With useplatformtick set to yes the synthetic timer is not used but enough of that, I've probably bored everyone enough already.

    As for changing the 10MHz counter used in 1909, that can be done while still using the TSC as the source. Here it is changed from 10MHz to 10kHz just as an example.
    [​IMG]
     
    Last edited: Apr 29, 2020
    yobooh likes this.
  7. Cyberdyne

    Cyberdyne Ancient Guru

    Messages:
    3,582
    Likes Received:
    301
    GPU:
    2080 Ti FTW3 Ultra
    Doesn't qualify for what? Recall that my complaint is not the use of hpet, because you shouldn't be using it. My complaint was the claim that older Windows 10 versions are superior for input lag.
     
  8. theahae

    theahae Member

    Messages:
    49
    Likes Received:
    5
    GPU:
    GTX 1060
    @Groot can you share a link to the win reported clocks tool ?
     
  9. Marctraider

    Marctraider Member

    Messages:
    17
    Likes Received:
    6
    GPU:
    670GTX
     
    Last edited: May 6, 2020
  10. cloakengaged

    cloakengaged Member

    Messages:
    11
    Likes Received:
    0
    GPU:
    AMD
    how exactly? is there any guide/manual to reduce latency?
     

  11. Smough

    Smough Master Guru

    Messages:
    639
    Likes Received:
    112
    GPU:
    GTX 1060 3GB
    That isn't latency, Windows 1809 seems to have even lower latency than 1803, that is just response time that should be a bit slower with the 10MHz counter, but I really haven't noticed it.

    Anyways, I asked this guy how can you do this via PM and he completely ignored me, so I guess he doesn't want to tell this to anyone. :shrug:
     
    Last edited: May 8, 2020
    cloakengaged likes this.
  12. janos666

    janos666 Maha Guru

    Messages:
    1,037
    Likes Received:
    171
    GPU:
    MSI RTX3080 10Gb
    I guess it requires binary patching of a system file (and that possibly involves the bypassing of some OS temper protection).
     
    Smough and cloakengaged like this.
  13. limeay

    limeay Active Member

    Messages:
    60
    Likes Received:
    1
    GPU:
    Nvidia GTX 1080 Ti
    This is like 4 months late but i finally found a solution today while tinkering with my BIOS!

    TL;DR, If you disabled it in BIOS/UEFI, Re-Enable it and the OS will reinstall it and it will reappear back in the "system devices" section of Device Manager, i re-disabled it in Device Manager & once i got it to reappear in Device Manager. I am happy now. Upgrading to a new version of Windows 10 does not fix this issue if you have it disabled in BIOS/UEFI.
    Also if you are trying to disable this in BIOS/UEFI and disable in OS, it's not going to work as it will be grayed out with no drivers for it.

    EDITTED:**
    I just recently upgraded to Windows 10 v2004 and UNFORTUNATELY, no luck! I still couldn't get HPET to be reinstalled in Device Manager. Upgrading does not reinstall HPET... BUT I also seemingly forgot I disabled HPET in BIOS/UEFI then I found the reason why it does not reinstall by default. Because once i looked into my BIOS on my notebook for settings and saw HPET was disabled i said why not Re-Enable it. I tried to disable it in OS after disabling it in BIOS and it was grayed out as there was only two options which was to uninstalling it or update it as there were no available drivers. Not sure how people get it to be disabled in both Device Manager and BIOS.
     
    Last edited: Jun 7, 2020
  14. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,947
    Likes Received:
    4,036
    GPU:
    GTX 1080ti
    disabling it in device manager doesn't disable it :rolleyes:
     
    Blackfyre and Smough like this.
  15. limeay

    limeay Active Member

    Messages:
    60
    Likes Received:
    1
    GPU:
    Nvidia GTX 1080 Ti
    Not sure about that. I do feel a bit of a difference. I just want the least amount of latency.
     

  16. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,947
    Likes Received:
    4,036
    GPU:
    GTX 1080ti
  17. Mineria

    Mineria Ancient Guru

    Messages:
    4,524
    Likes Received:
    236
    GPU:
    Asus RTX 2080 Super
    Ryzen Master uses HPET.


    To those messing around with it.

    Windows 10 doesn't use it by default, should still be enabled in BIOS but neither forced on nor off, just leave it at default = bcdedit /deletevalue useplatformclock, that way applications that use the timer are free to use it.

    Using the setting below forces it on/off, only recommended for debugging.
    bcdedit /set useplatformclock yes
    bcdedit /set useplatformclock no

    Also, if your on older Zen platforms, update BIOS and drivers if you run into increased latency by having HPET enabled, there was a bug that which has been fixed by AMD.
     
    Last edited: Jun 8, 2020
    Blackfyre likes this.
  18. X7007

    X7007 Ancient Guru

    Messages:
    1,636
    Likes Received:
    38
    GPU:
    Sapphire 6900XT
    So the update bios fixed the HPET enabled in the BIOS? Because I noticed every time I enabled HPET and test Latencymon I have high CPU USAGE for no reason. I don't know why it happens. I can hear the CPU Fans going crazy.

    I have AMD 1950x with Gigabyte X399 Auros Gaming 7 F12 Latest bios.
     
  19. Mineria

    Mineria Ancient Guru

    Messages:
    4,524
    Likes Received:
    236
    GPU:
    Asus RTX 2080 Super
    Did you look deeper into Latencymon to see what software/driver that causes it?

    AMD drivers updated?

    Do you have Ryzen Master running in the background?
    If not something else must using it, maybe Gigabytes software? I ended up uninstalling all of it and control everything from BIOS instead.
     
  20. X7007

    X7007 Ancient Guru

    Messages:
    1,636
    Likes Received:
    38
    GPU:
    Sapphire 6900XT
    No drivers actually causing it, even with low DPC no drivers are actually causing the issue.

    AMD newest it happens no matter which ones were installed.

    Don't have Ryzen Master installed
    Don't have any gigabyte software installed
     

Share This Page