02/Jan/2026

broken firmawre!

okay so for the uninitiated, linux keeps track of time using one of multiple choices, TSC (time stamp counter, counts number of cpu cycles), HPET (high precision event timer, software) and some weird acpi options

TSC is normally exteremly quick, but can be innacurate if not careful, while HPET is perfectly (at least i think so) accurate, while also being orders of magnitude slower

TSC doesn't work properly on my sytem.

so it doesn't work on my system right, linux disables it on boot

Measured N cycles TSC warp between CPUs, turning off TSC clock.

that's fun, and hpet is really slow in some cases, so what do?

well the first option is to mark it as stable using kernel params and setting the clock to tsc forcefully

outcome? everything starts glitching out, programs are reporting the clock going back in time, some games even kick me for it

so clearly that's a no go, the kernel is right not using tsc

so i came across a couple of kernel patches, mainly the tsc named ones from this port of postmarketos to the steam deck, very odd i know

digging further, i came across this email from the patch author, where they mentiond "A Lenovo ThinkPad A485 with a Ryzen 2700U", which is awfully similar to mine

reading further, "I've seen the problem since then occasionally on newer Ryzen laptops (and even desktops)"

very fun, thank you

actually building my kernel with the patches is simple enough, i just copied the arch linux-zen package and added the patches as a source, the pkgbuild automatically picks them up, i just need to update the hashes

it's just that i decided to compile at 4 in the morning and it took a while

oh well, after that all it took was adding tsc=direct-sync to my kernel arguments, alongside tsc=nowatchdog, since that messed up things (i think there was a patch for this but i skipped it)

now it automatically uses tsc and it runs good, no weird behaviour either, isn't that fun?