Bug 262155 - atkbd: ~16s delay at initial kernel boot on Framework laptop
Summary: atkbd: ~16s delay at initial kernel boot on Framework laptop
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Johnston
URL:
Keywords: needs-qa, performance
Depends on:
Blocks: frameworklaptop
  Show dependency treegraph
 
Reported: 2022-02-23 15:55 UTC by Ed Maste
Modified: 2022-03-31 16:16 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable13?
koobs: mfc-stable12?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2022-02-23 15:55:16 UTC
Immediately after the loader finishes the screen clears, then nothing happens for about 16s until the debugger backends / copyright messages are emitted.

kevans via markj reports that it is due to atkbd. I removed atkbdc, atkbd, and psm from the kernel config and the delay is indeed gone although I now have no working keyboard
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2022-02-24 21:06:11 UTC
POC which addresses this: https://reviews.freebsd.org/D34367
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-03-01 14:41:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=84369dd52369cbae28970dca20a53d3de1719907

commit 84369dd52369cbae28970dca20a53d3de1719907
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-03-01 14:39:35 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-03-01 14:39:35 +0000

    x86: Probe the TSC frequency earlier

    This lets us use the TSC to implement early DELAY, limiting the use of
    the sometimes-unreliable 8254 PIT.

    PR:             262155
    Reviewed by:    emaste
    Tested by:      emaste, mike tancsa <mike@sentex.net>, Stefan Hegnauer <stefan.hegnauer@gmx.ch>
    MFC after:      1 month
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D34367

 sys/amd64/amd64/machdep.c |  14 +++++-
 sys/i386/i386/machdep.c   |  11 ++++-
 sys/x86/include/clock.h   |   3 +-
 sys/x86/isa/clock.c       |   4 +-
 sys/x86/x86/tsc.c         | 123 +++++++++++++++++++++++++---------------------
 5 files changed, 94 insertions(+), 61 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-03-31 16:08:43 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=44eddec48e5fc09679ce12210e3a02dfeb14889c

commit 44eddec48e5fc09679ce12210e3a02dfeb14889c
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-03-01 14:39:35 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-03-31 16:05:25 +0000

    x86: Probe the TSC frequency earlier

    This lets us use the TSC to implement early DELAY, limiting the use of
    the sometimes-unreliable 8254 PIT.

    PR:             262155
    Reviewed by:    emaste
    Tested by:      emaste, mike tancsa <mike@sentex.net>, Stefan Hegnauer <stefan.hegnauer@gmx.ch>
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 84369dd52369cbae28970dca20a53d3de1719907)

 sys/amd64/amd64/machdep.c |  14 +++++-
 sys/i386/i386/machdep.c   |  11 ++++-
 sys/x86/include/clock.h   |   3 +-
 sys/x86/isa/clock.c       |   4 +-
 sys/x86/x86/tsc.c         | 123 +++++++++++++++++++++++++---------------------
 5 files changed, 94 insertions(+), 61 deletions(-)