Re: inteldrm changes cause high temperature / fan speeds (was: Downgrade 6.6 to 6.5)

2019-11-12 Thread Ted Unangst
Tero Koskinen wrote:
> Eventually I pinned the problem down to April 14/15:
> 
> FAULTY 091f8f6587f dlg  Mon Apr 15 02:59:41 2019 +  the myx_cmd
> FAULTY 1bbcb699ab8 dlg  Mon Apr 15 00:28:29 2019 +  there's a bunch
> PROBLEM! 7f4dd37977d jsg  Sun Apr 14 10:14:50 2019 +  Update shared 
> drm code
> OK 505701c75b3 visa Sun Apr 14 08:51:31 2019 +  Add lock
> 
> I must admit that I don't have yet any idea how to fix
> the problematic commit (or what is actually wrong there).

This is not too surprising. It's still a bit of a mystery what's different
between machines that behave fine and those that don't.

I have the same machine, and it's never been problematic.

I note I'm at the same old bios I had when I first purchased it.
bios0: vendor LENOVO version "N23ET61W (1.36 )" date 01/17/2019

And there are some other bios options, regarding bios/efi and thunderbolt and
suspend that can be set one way or the other. I have everything turned down to
whatever the "oldest" settings are. CMS boot, etc.



Re: inteldrm changes cause high temperature / fan speeds (was: Downgrade 6.6 to 6.5)

2019-11-12 Thread Otto Moerbeek
On Wed, Nov 13, 2019 at 08:19:15AM +0200, Tero Koskinen wrote:

> Hi,
> 
> Sorry if someone gets this twice. My first version didn't go to the list.
> 
> cho...@jtan.com wrote on 6.11.2019 19.52:
> > Theo de Raadt writes:
> >> I have some sort of X1rev6 and I don't see the problem.
> >>
> >> The situation is you have the hardware, and you also have the sourcecode,
> >> and the repository to traverse investigate the problem.
> >>
> >> That sounds hard, until you give it a try.
> > 
> > To be fair, it *is* hard. 
> 
> I have same problem on my Dell Optiplex 990 (running in "headless" mode,
> no monitor attached!).
> 
> After upgrade from 6.5-stable to 6.6-current, CPU temperature
> increased from 50C to 70C..80C and the fans are running at full speed.
> 
> So, I went and cloned OpenBSD src tree from https://github.com/openbsd/src/
> 
> Then I started bisecting kernel commits from 6.5-release to 6.6-current:
>  > ls -1 kernels
> bsd.apr10.a72c25aac8e43fe
> bsd.apr14.505701c75b30a46033a8
> bsd.apr23.53d03815630664
> bsd.apr27.c1f77a6b17d5a799d322
> bsd.apr29.47170b90f4a74
> bsd.apr5.b2516e1f98d4a5f7757
> bsd.jul31.ddc1a6c2c17
> bsd.jun.b2a28ec4ea
> bsd.jun1.535cf6c2b
> bsd.may1.4a0e86bfb04cce9
> bsd.may19.01b2b04ad452620a32
>  >
> 
> (Note the list isn't complete. I noticed that kernel became backwards
> incompatible at some point in April and I had to create a temporary
> 6.5 installation on another disk.)
> 
> Eventually I pinned the problem down to April 14/15:
> 
> FAULTY 091f8f6587f dlg  Mon Apr 15 02:59:41 2019 +  the myx_cmd
> FAULTY 1bbcb699ab8 dlg  Mon Apr 15 00:28:29 2019 +  there's a bunch
> PROBLEM! 7f4dd37977d jsg  Sun Apr 14 10:14:50 2019 +  Update shared 
> drm code
> OK 505701c75b3 visa Sun Apr 14 08:51:31 2019 +  Add lock
> 
> I must admit that I don't have yet any idea how to fix
> the problematic commit (or what is actually wrong there).
> 
> Reverting 7f4dd37977d didn't work for latest 6.6-current as there
> have been too many changes after that.
> 
> I also tried to check the latest changes from linux-4.19.y,
> but didn't spot anything useful.
> 
> Yours,
>   Tero

If you run top -S, do you see any process taking lots of CPU?

-Otto
> 
> 
> dmesg:
> OpenBSD 6.6-current (GENERIC.MP) #452: Mon Nov 11 19:08:23 MST 2019
>  dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4153880576 (3961MB)
> avail mem = 4015665152 (3829MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf2650 (71 entries)
> bios0: vendor Dell Inc. version "A19" date 08/26/2015
> bios0: Dell Inc. OptiPlex 990
> acpi0 at bios0: ACPI 4.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC TCPA SSDT MCFG HPET BOOT SSDT SSDT DMAR SLIC
> acpi0: wakeup devices EHC1(S3) EHC2(S3) HDEF(S4) GLAN(S4) RP01(S4) 
> PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) 
> PXSX(S4) RP06(S4) PXSX(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.69 MHz, 06-2a-07
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
> cpu3: 
> FPU,VME,

inteldrm changes cause high temperature / fan speeds (was: Downgrade 6.6 to 6.5)

2019-11-12 Thread Tero Koskinen
Hi,

Sorry if someone gets this twice. My first version didn't go to the list.

cho...@jtan.com wrote on 6.11.2019 19.52:
> Theo de Raadt writes:
>> I have some sort of X1rev6 and I don't see the problem.
>>
>> The situation is you have the hardware, and you also have the sourcecode,
>> and the repository to traverse investigate the problem.
>>
>> That sounds hard, until you give it a try.
> 
> To be fair, it *is* hard. 

I have same problem on my Dell Optiplex 990 (running in "headless" mode,
no monitor attached!).

After upgrade from 6.5-stable to 6.6-current, CPU temperature
increased from 50C to 70C..80C and the fans are running at full speed.

So, I went and cloned OpenBSD src tree from https://github.com/openbsd/src/

Then I started bisecting kernel commits from 6.5-release to 6.6-current:
 > ls -1 kernels
bsd.apr10.a72c25aac8e43fe
bsd.apr14.505701c75b30a46033a8
bsd.apr23.53d03815630664
bsd.apr27.c1f77a6b17d5a799d322
bsd.apr29.47170b90f4a74
bsd.apr5.b2516e1f98d4a5f7757
bsd.jul31.ddc1a6c2c17
bsd.jun.b2a28ec4ea
bsd.jun1.535cf6c2b
bsd.may1.4a0e86bfb04cce9
bsd.may19.01b2b04ad452620a32
 >

(Note the list isn't complete. I noticed that kernel became backwards
incompatible at some point in April and I had to create a temporary
6.5 installation on another disk.)

Eventually I pinned the problem down to April 14/15:

FAULTY 091f8f6587f dlg  Mon Apr 15 02:59:41 2019 +  the myx_cmd
FAULTY 1bbcb699ab8 dlg  Mon Apr 15 00:28:29 2019 +  there's a bunch
PROBLEM! 7f4dd37977d jsg  Sun Apr 14 10:14:50 2019 +  Update shared 
drm code
OK 505701c75b3 visa Sun Apr 14 08:51:31 2019 +  Add lock

I must admit that I don't have yet any idea how to fix
the problematic commit (or what is actually wrong there).

Reverting 7f4dd37977d didn't work for latest 6.6-current as there
have been too many changes after that.

I also tried to check the latest changes from linux-4.19.y,
but didn't spot anything useful.

Yours,
  Tero


dmesg:
OpenBSD 6.6-current (GENERIC.MP) #452: Mon Nov 11 19:08:23 MST 2019
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4153880576 (3961MB)
avail mem = 4015665152 (3829MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf2650 (71 entries)
bios0: vendor Dell Inc. version "A19" date 08/26/2015
bios0: Dell Inc. OptiPlex 990
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC TCPA SSDT MCFG HPET BOOT SSDT SSDT DMAR SLIC
acpi0: wakeup devices EHC1(S3) EHC2(S3) HDEF(S4) GLAN(S4) RP01(S4) 
PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) 
PXSX(S4) RP06(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.69 MHz, 06-2a-07
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz, 2494.35 MHz, 06-2a-07
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-w