Bug 215037 - Thinkpad X395: TSC unstable
Summary: Thinkpad X395: TSC unstable
Status: RESOLVED ANSWERED
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on: 202525
Blocks:
  Show dependency tree
 
Reported: 2021-11-15 20:00 UTC by Martin Jørgensen
Modified: 2022-01-06 18:38 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.14.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output after boot (84.20 KB, text/plain)
2021-11-15 20:00 UTC, Martin Jørgensen
Details

Description Martin Jørgensen 2021-11-15 20:00:30 UTC
Created attachment 299585 [details]
dmesg output after boot

I'm running latest Debian Unstable (kernel ) on a ThinkPad X395 ()

During boot the kernel marks the TSC as unsable.

[    3.608099] clocksource: timekeeping watchdog on CPU6: Marking clocksource 'tsc' as unstable because the skew is too large:
[    3.608108] clocksource:                       'hpet' wd_nsec: 515089627 wd_now: 308a7d6 wd_last: 2981eac mask: ffffffff
[    3.608111] clocksource:                       'tsc' cs_nsec: 516009461 cs_now: 8af414c81 cs_last: 86ec98207 mask: ffffffffffffffff
[    3.608114] clocksource:                       'tsc' is current clocksource.
[    3.608123] tsc: Marking TSC unstable due to clocksource watchdog
[    3.611142] TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
[    3.611152] sched_clock: Marking unstable (3609109495, 2031636)<-(3614769552, -3628424)
[    3.611387] clocksource: Checking clocksource tsc synchronization from CPU 3 to CPUs 0-1,4,6.
[    3.611738] clocksource: Switched to clocksource hpet

I can't tell if it breaks anything serious. When setting "tsc=unstable" kernel option, dmesg says:

[    0.975959] Unstable clock detected, switching default tracing clock to "global"
               If you want to keep using the local clock, then add:
                 "trace_clock=local"
               on the kernel command line
Comment 1 Martin Jørgensen 2021-11-15 20:05:57 UTC
Forgot to add:
"
I'm running latest Debian Unstable (Linux rw 5.14.0-4-amd64 #1 SMP Debian 5.14.16-1 (2021-11-03) x86_64 GNU/Linux) on a ThinkPad X395 (LENOVO 20NL001RMX/20NL001RMX, BIOS R13ET50W(1.24 ) 06/11/2021, ThinkPad BIOS R13ET50W(1.24 ), EC R13HT50W)
"
Comment 2 Nix\ 2021-12-20 00:01:23 UTC
With acpi=off clocksourcec=tsc in kernel cmdline, the kernel select tsc-early and no mark an unstable, but the 4 cores of the Ryzen 3 3200U dissapear and show only one.
Kernel 5.15.10 and 5.16-rc5
AMD Ryzen 3 3200U Lenovo Ideapad L340-15API

But i remember the same bug with a old Phenom 945 using Fedora 28, so, a firmware amd bug?
Comment 3 Borislav Petkov 2022-01-06 18:38:17 UTC
Lenovo are known to f*ck with the TSC in the BIOS when they should not. At all. I have a T14 here which has the same issue - it actually comes out of reset unsynchronized. AFAIK, some BIOS updates have fixed this but you'll have to update your BIOS and see. Unfortunately, there's nothing we can do in the kernel about it. Sorry.

Note You need to log in before you can comment on or make changes to this bug.