On Feb 07 13:19:20, [email protected] wrote:
> On Mon, Feb 7, 2022 at 10:04 AM Jan Stary <[email protected]> wrote:
> 
> > On Feb 05 13:41:25, [email protected] wrote:
> > > On Sat, Feb 5, 2022 at 2:54 AM Jan Stary <[email protected]> wrote:
> > >
> > > > This is current/amd64 on a Thinkapd T420s, dmesgs below.
> > > > It seems that C2 is or is not supported depending on
> > > > whether the machine boots on AC or on battery
> > > > (judging by three boots of each).
> > > > Is this intended?
> > >
> > > The acpicpu driver is reporting what ACPI told it; presumably the authors
> > > of the AML intended this change as a way to reduce power consumption.
> > >
> > > Now, ACPI provides a mechanism for the OS to tell it to notify the OS if
> > > the contents of the _CST table changes and at least in some cases
> > > acpicpu registers for that and if called it would write new acpicpu lines
> > > to the dmesg.
> > >
> > > If you're not seeing those when plugging/unplugging,
> >
> > I don't.
> >
> > > there are two
> > > possibilities:
> > >  * does the AML on your system actually change the values and trigger the
> > > notify?
> > >  * is acpicpu actually registering the callback correctly?
> > >
> > > I would suggest adding a printf() right before the aml_register_notify()
> > > call in acpicpu.c to see if it's actually being hit,
> >
> > Probably not: I added a printf() right there
> > but nothing shows in dmesg when plugging/unpluging.
> >
> 
> That aml_register_notify() path is a *boot* time path,
> when acpicpu is attaching.
> What printf() did you add and did it appear during boot?  If
> not, then the OS isn't registering the notify callback.


Index: dev/acpi/acpicpu.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpicpu.c,v
retrieving revision 1.91
diff -u -p -r1.91 acpicpu.c
--- dev/acpi/acpicpu.c  9 Jan 2022 05:42:37 -0000       1.91
+++ dev/acpi/acpicpu.c  8 Feb 2022 07:59:59 -0000
@@ -794,6 +794,7 @@ acpicpu_attach(struct device *parent, st
                                    0, sc->sc_acpi->sc_fadt->pstate_cnt);
                        }
 
+                       printf("aml register notify\n");
                        aml_register_notify(sc->sc_devnode, NULL,
                            acpicpu_notify, sc, ACPIDEV_NOPOLL);
 

It does not show during boot.

> Please send a report to bugs@ with sendbug as root,
> including the acpidump output.

Just did.

Thanks for the insight,

        Jan


Reply via email to