Re: CPU0 at 100% on Thinkpad 480 with OpenBSD 7.4

2023-11-27 Thread Mike Larkin
On Mon, Nov 27, 2023 at 11:38:01AM -0700, Theo de Raadt wrote:
> Mike Larkin  wrote:
>
> > On Mon, Nov 27, 2023 at 01:05:56PM -0500, Laurent Cimon wrote:
> > > Hi,
> > >
> > >
> > > The CPU0 on my Thinkpad 480 is always running at around 100%. It's on
> > > OpenBSD 7.4.
> > >
> > > It seems to be doing this in the kernel.
> > >
> > >
> > > Here is the CPU's line from top(1).
> > >
> > >     CPU0:  0.0% user,  0.0% nice, 79.3% sys,  3.8% spin, 16.3
> > >
> > >
> > > It's always this specific CPU, and it's been draining my battery.
> > >
> > > How do I find what causes this?
> > >
> > >
> > > I think that it starts doing it after waking from sleep, as it doesn't do 
> > > it
> > > when the system is freshly started.
> > >
> > > But I'd need to do some tests before verifying this.
> > >
> > >
> > > Laurent
> > >
> >
> > Please search the list, this has been reported and solved many times,
> > specifically for this machine.
> >
>
> It is not solved.
>
> There is a "workaround"
>
> We do something wrong by not managing thunderbolt, but it is not clear
> what we are supposed to do.  My theory is that thunderbolt is initialized
> far enough by BIOS or chipset default configuration or our driver, that
> interrupts occur which we don't handle, and spin.
>

fair enough, that's a more accurate description.



Re: CPU0 at 100% on Thinkpad 480 with OpenBSD 7.4

2023-11-27 Thread Theo de Raadt
Mike Larkin  wrote:

> On Mon, Nov 27, 2023 at 01:05:56PM -0500, Laurent Cimon wrote:
> > Hi,
> >
> >
> > The CPU0 on my Thinkpad 480 is always running at around 100%. It's on
> > OpenBSD 7.4.
> >
> > It seems to be doing this in the kernel.
> >
> >
> > Here is the CPU's line from top(1).
> >
> >     CPU0:  0.0% user,  0.0% nice, 79.3% sys,  3.8% spin, 16.3
> >
> >
> > It's always this specific CPU, and it's been draining my battery.
> >
> > How do I find what causes this?
> >
> >
> > I think that it starts doing it after waking from sleep, as it doesn't do it
> > when the system is freshly started.
> >
> > But I'd need to do some tests before verifying this.
> >
> >
> > Laurent
> >
> 
> Please search the list, this has been reported and solved many times,
> specifically for this machine.
> 

It is not solved.

There is a "workaround"

We do something wrong by not managing thunderbolt, but it is not clear
what we are supposed to do.  My theory is that thunderbolt is initialized
far enough by BIOS or chipset default configuration or our driver, that
interrupts occur which we don't handle, and spin.



Re: CPU0 at 100% on Thinkpad 480 with OpenBSD 7.4

2023-11-27 Thread Laurent Cimon

On 11/27/23 13:12, Mike Larkin wrote:


On Mon, Nov 27, 2023 at 01:05:56PM -0500, Laurent Cimon wrote:

Hi,


The CPU0 on my Thinkpad 480 is always running at around 100%. It's on
OpenBSD 7.4.

It seems to be doing this in the kernel.


Here is the CPU's line from top(1).

     CPU0:  0.0% user,  0.0% nice, 79.3% sys,  3.8% spin, 16.3


It's always this specific CPU, and it's been draining my battery.

How do I find what causes this?


I think that it starts doing it after waking from sleep, as it doesn't do it
when the system is freshly started.

But I'd need to do some tests before verifying this.


Laurent


Please search the list, this has been reported and solved many times,
specifically for this machine.



I found the solution on the Lenovo forums. It's an ACPI issue with 
Thunderbolt, affecting even Linux and older versions of Windows.


The solution is to disable Thunderbolt in the BIOS. Security -> I/O Port 
Access.



Laurent



Re: CPU0 at 100% on Thinkpad 480 with OpenBSD 7.4

2023-11-27 Thread Mike Larkin
On Mon, Nov 27, 2023 at 01:05:56PM -0500, Laurent Cimon wrote:
> Hi,
>
>
> The CPU0 on my Thinkpad 480 is always running at around 100%. It's on
> OpenBSD 7.4.
>
> It seems to be doing this in the kernel.
>
>
> Here is the CPU's line from top(1).
>
>     CPU0:  0.0% user,  0.0% nice, 79.3% sys,  3.8% spin, 16.3
>
>
> It's always this specific CPU, and it's been draining my battery.
>
> How do I find what causes this?
>
>
> I think that it starts doing it after waking from sleep, as it doesn't do it
> when the system is freshly started.
>
> But I'd need to do some tests before verifying this.
>
>
> Laurent
>

Please search the list, this has been reported and solved many times,
specifically for this machine.



CPU0 at 100% on Thinkpad 480 with OpenBSD 7.4

2023-11-27 Thread Laurent Cimon

Hi,


The CPU0 on my Thinkpad 480 is always running at around 100%. It's on 
OpenBSD 7.4.


It seems to be doing this in the kernel.


Here is the CPU's line from top(1).

    CPU0:  0.0% user,  0.0% nice, 79.3% sys,  3.8% spin, 16.3


It's always this specific CPU, and it's been draining my battery.

How do I find what causes this?


I think that it starts doing it after waking from sleep, as it doesn't 
do it when the system is freshly started.


But I'd need to do some tests before verifying this.


Laurent