Re: Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-11-29 Thread Thomas Merkel
Hello,

the sluggish high CPU utilization is basically an ACPI interrupt
storm, which has already been described in the following mailinglist
post from Martin "ACPI interrupt storm on ThinkPad T480s" [1].

I also applied the patch / workaround from Martin which solved the
issue for me. With this workaround both BIOS modes (Assist Mode:
Enable or Disabled) are working, with and without docking station.

Best regards,
Thomas

[1] https://marc.info/?l=openbsd-bugs=152022260714390=2
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index e4a134da02a..238bf42b08d 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -2209,14 +2209,24 @@ acpi_gpe(struct acpi_softc *sc, int gpe, void *arg)
struct aml_node *node = arg;
uint8_t mask, en;
 
-   dnprintf(10, "handling GPE %.2x\n", gpe);
-   aml_evalnode(sc, node, 0, NULL, NULL);
+   if (!sc->gpe_table[gpe].edge && gpe == 111) {
+   static unsigned short i;
+   if (i == 0) {
+   i++;
+   printf("acpi_gpe %d %s IGNORING\n", gpe, node->name);
+   }
+   } else {
+   printf("acpi_gpe %d %s\n", gpe, node->name);
 
-   mask = (1L << (gpe & 7));
-   if (!sc->gpe_table[gpe].edge)
-   acpi_write_pmreg(sc, ACPIREG_GPE_STS, gpe>>3, mask);
-   en = acpi_read_pmreg(sc, ACPIREG_GPE_EN,  gpe>>3);
-   acpi_write_pmreg(sc, ACPIREG_GPE_EN,  gpe>>3, en | mask);
+   dnprintf(10, "handling GPE %.2x\n", gpe);
+   aml_evalnode(sc, node, 0, NULL, NULL);
+
+   mask = (1L << (gpe & 7));
+   if (!sc->gpe_table[gpe].edge)
+   acpi_write_pmreg(sc, ACPIREG_GPE_STS, gpe>>3, mask);
+   en = acpi_read_pmreg(sc, ACPIREG_GPE_EN,  gpe>>3);
+   acpi_write_pmreg(sc, ACPIREG_GPE_EN,  gpe>>3, en | mask);
+   }
return (0);
 }
 


Re: Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-11-27 Thread Thomas Merkel
Hello,

first of all thank you for sharing your BIOS settings, especially the
"Thunderbolt BIOS Assist Mode". Based on this setting I've two issues
depends if the Assist Mode is enabled or not.

* Thunderbolt BIOS Assist Mode: Enable [1]

System is okey, no sluggish high CPU utilization (on first boot).
Suspend works well without any issue. But if I connect the Thinkpad to
an Docking station (Lenovo ThinkPad Pro Dock EU 130 W 40AH0135EU)
I have always high CPU utilization on each boot.

* Thunderbolt BIOS Assist Mode: Disabled [2]

High CPU utilization on first/cold boot. Everything is fine after an
reboot. Suspend doesn't work because high CPU utilization after
wakeup.


Based on the diff of both modes the biggest difference are the
additional devices which are shown if the Assist Mode is disabled:

-->8--
--- thunderbold_assit_on.dmesgSun Nov 25 19:27:31 2018
+++ thunderbold_assit_off.dmesgSun Nov 25 19:21:10 2018
+acpipwrres1 at acpi0: PXP_, resource for RP09
-acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
+acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
+ppb3 at pci3 dev 0 function 0 "Intel JHL6540 Thunderbolt" rev 0x02
+pci4 at ppb3 bus 6
+ppb4 at pci4 dev 0 function 0 "Intel JHL6540 Thunderbolt" rev 0x02: msi
+pci5 at ppb4 bus 7
+"Intel JHL6540 Thunderbolt" rev 0x02 at pci5 dev 0 function 0 not configured
+ppb5 at pci4 dev 1 function 0 "Intel JHL6540 Thunderbolt" rev 0x02: msi
+pci6 at ppb5 bus 8
+ppb6 at pci4 dev 2 function 0 "Intel JHL6540 Thunderbolt" rev 0x02: msi
+pci7 at ppb6 bus 59
+xhci1 at pci7 dev 0 function 0 "Intel JHL6540 Thunderbolt" rev 0x02: msi, xHCI 
1.16
+usb1 at xhci1: USB revision 3.0
+uhub1 at usb1 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
+ppb7 at pci4 dev 4 function 0 "Intel JHL6540 Thunderbolt" rev 0x02: msi
+pci8 at ppb7 bus 60
--8<--

Current system: 6.4-current

Maybe somebody could guide me into any direction which I could look
into to debug this issue (particularly with the docking station).

Thanks and best regards,
Thomas


[1] https://dmesgd.nycbug.org/index.cgi?do=view=4610
[2] https://dmesgd.nycbug.org/index.cgi?do=view=4611



Re: Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-10-28 Thread Robert
Hi ivpgbe@,

Thanks for the details!
Yes, it was not my intention to indicate anything; but since I saw
those reports of bricked machines during the last days (and having
Thinkpads myself) I wanted to be rather safe than sorry.

regards,
Robert


On Sun, 28 Oct 2018 07:15:10 -0700
ivp...@eml.cc wrote:

> Hi Robert,
> 
> I'm certainly not trolling (although I'm not sure what would be a protocol to 
> prove it, other than posting a video that shows all mentioned BIOS settings 
> and than a successful boot), and I'm sure you are not trolling either, as I 
> can see a number of postings to this mailing list and your first one is from 
> 10 years ago. [1] A never considered a threat model where a malicious user 
> posts knowingly bad BIOS settings to brick other users machines, thank you 
> for being vigilant. If anyone else thinks that posting a video with my BIOS 
> settings and a successful boot would be useful, I'm happy to do that.
> 
> In addition to double-checking my settings, I also looked at 4 links you've 
> provided (I don't read German and can't check the last one).
> 
> The first one is a very similar machine (the difference, from what I 
> understand, is that all Yoga's have a multi-touch screen), but the post is 
> from 7/13, and whatever the issue they encountered, I'm using a later BIOS 
> (version 1.31 from 9/15).
> 
> The second one is posted on 9/15, but the author and few others with similar 
> problems have P52, which is a different machine - dual graphics with NVIDIA 
> chip and a different CPUs - either i8750H or i8850H 6-core processors, while 
> I have a i8550U. However, what is similar, is that enabling the BIOS Assist 
> Mode does indeed require a 15-sec or so reboot, as the author describes, and 
> that seemed to be a step that bricked their machine.
> 
> The third author also has a different machine (P1, also with NVIDIA 
> graphics), and they refer to BIOS version 1.12 from 10/12 release - again, a 
> different BIOS. They also post a solution for their problem [2], however it 
> requires extracting firmware and flushing it to EEPROM, so you better know 
> what you are doing.
> 
> The fourth author has a P72 (also a machine with NVIDIA graphics), and they 
> did say they changed something in BIOS although they never specify what 
> exactly.
> 
> Thanks!
> 
> [1] https://marc.info/?l=openbsd-misc=128033208924257=2
> [2] 
> https://www.reddit.com/r/thinkpad/comments/9rnimi/ladies_and_gentlemen_i_present_to_you_the/
> 
> On Sun, Oct 28, 2018, at 4:47 AM, Robert wrote:
> > WARNING:
> > 
> > I do not know if the orginal author is serious, or if he is trolling.
> > 
> > But there are known issues with the stated Thunderbolt setting in BIOS
> > that can brick your Thinkpad beyond repair (or BIOS reset).
> > 
> > See here:
> > https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Thinkpad-X1-Yoga-3rd-Gen-Stuck-at-Black-Screen-After-Enabling/td-p/4106952/page/3
> > https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/Lenovo-P52-bricked-by-selecting-BIOS-thunderbolt-support-for/td-p/4207538
> > https://www.reddit.com/r/thinkpad/comments/9qmqd2/thinkpad_p1_serious_issue_with_bricked_bios/
> > https://www.reddit.com/r/thinkpad/comments/9nb3zo/new_thinkpad_p72_biosuefi_corrupted_just_black/
> > 
> > (german)
> > https://www.notebookcheck.com/Lenovo-Einige-aktuelle-ThinkPads-koennen-scheinbar-durch-eine-UEFI-Einstellung-zerstoert-werden.346101.0.html
> > 
> > /Robert
> > 
> > 
> > On Sun, 28 Oct 2018 00:50:03 -0700
> > ivp...@eml.cc wrote:
> >   
> > > Hello,
> > > 
> > > several people reported about various problems with Lenovo Thinkpad X1 
> > > Carbon 6th gen (X1C6), when performance become sluggish and fan goes 
> > > wild. [1] [2] [3]
> > > 
> > > I had similar problem (system OK, become sluggish with high CPU 
> > > utilization after sleep/wake), but was able to completely and reliably 
> > > fix it by updating to latest Lenovo BIOS (2018-09-17, version 1.31), and 
> > > setting the following settings in the BIOS:
> > > 
> > > * UEFI Secure Boot: Off
> > > * Power -> Sleep State: Linux
> > > * Startup -> UEFI/Legacy Boot: UEFI Only
> > > * Startup -> CSM Support: Yes
> > > * Config -> Thunderbolt(TM) 3 -> Thunderbolt BIOS Assist Mode: Enable
> > > * Config -> Thunderbolt(TM) 3 -> Wake by Thunderbolt(TM) 3: Disable
> > > 
> > > It's the Thunderbolt BIOS Assist Mode: Enable that finally solved my 
> > > problem. (In the BIOS itself, it recommends to set this option to Enable 
> > > for Linux systems). Everything is perfect now with my system.
> > > 
> > > I'm running -current:
> > > 
> > > thor$ dmesg | grep OpenBSD   
> > > OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
> > > 
> > > I'm happy to assist other OpenBSD users or developers if you need help 
> > > further investigating this issue. I have described my adventure, along 
> > > with dmesg and other details, here [4]. My dmesg is below.
> > > 
> > > [1] https://www.youtube.com/watch?v=lb7mDXHGDFk
> 

Re: Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-10-28 Thread ivpgbe
Hi Robert,

I'm certainly not trolling (although I'm not sure what would be a protocol to 
prove it, other than posting a video that shows all mentioned BIOS settings and 
than a successful boot), and I'm sure you are not trolling either, as I can see 
a number of postings to this mailing list and your first one is from 10 years 
ago. [1] A never considered a threat model where a malicious user posts 
knowingly bad BIOS settings to brick other users machines, thank you for being 
vigilant. If anyone else thinks that posting a video with my BIOS settings and 
a successful boot would be useful, I'm happy to do that.

In addition to double-checking my settings, I also looked at 4 links you've 
provided (I don't read German and can't check the last one).

The first one is a very similar machine (the difference, from what I 
understand, is that all Yoga's have a multi-touch screen), but the post is from 
7/13, and whatever the issue they encountered, I'm using a later BIOS (version 
1.31 from 9/15).

The second one is posted on 9/15, but the author and few others with similar 
problems have P52, which is a different machine - dual graphics with NVIDIA 
chip and a different CPUs - either i8750H or i8850H 6-core processors, while I 
have a i8550U. However, what is similar, is that enabling the BIOS Assist Mode 
does indeed require a 15-sec or so reboot, as the author describes, and that 
seemed to be a step that bricked their machine.

The third author also has a different machine (P1, also with NVIDIA graphics), 
and they refer to BIOS version 1.12 from 10/12 release - again, a different 
BIOS. They also post a solution for their problem [2], however it requires 
extracting firmware and flushing it to EEPROM, so you better know what you are 
doing.

The fourth author has a P72 (also a machine with NVIDIA graphics), and they did 
say they changed something in BIOS although they never specify what exactly.

Thanks!

[1] https://marc.info/?l=openbsd-misc=128033208924257=2
[2] 
https://www.reddit.com/r/thinkpad/comments/9rnimi/ladies_and_gentlemen_i_present_to_you_the/

On Sun, Oct 28, 2018, at 4:47 AM, Robert wrote:
> WARNING:
> 
> I do not know if the orginal author is serious, or if he is trolling.
> 
> But there are known issues with the stated Thunderbolt setting in BIOS
> that can brick your Thinkpad beyond repair (or BIOS reset).
> 
> See here:
> https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Thinkpad-X1-Yoga-3rd-Gen-Stuck-at-Black-Screen-After-Enabling/td-p/4106952/page/3
> https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/Lenovo-P52-bricked-by-selecting-BIOS-thunderbolt-support-for/td-p/4207538
> https://www.reddit.com/r/thinkpad/comments/9qmqd2/thinkpad_p1_serious_issue_with_bricked_bios/
> https://www.reddit.com/r/thinkpad/comments/9nb3zo/new_thinkpad_p72_biosuefi_corrupted_just_black/
> 
> (german)
> https://www.notebookcheck.com/Lenovo-Einige-aktuelle-ThinkPads-koennen-scheinbar-durch-eine-UEFI-Einstellung-zerstoert-werden.346101.0.html
> 
> /Robert
> 
> 
> On Sun, 28 Oct 2018 00:50:03 -0700
> ivp...@eml.cc wrote:
> 
> > Hello,
> > 
> > several people reported about various problems with Lenovo Thinkpad X1 
> > Carbon 6th gen (X1C6), when performance become sluggish and fan goes wild. 
> > [1] [2] [3]
> > 
> > I had similar problem (system OK, become sluggish with high CPU utilization 
> > after sleep/wake), but was able to completely and reliably fix it by 
> > updating to latest Lenovo BIOS (2018-09-17, version 1.31), and setting the 
> > following settings in the BIOS:
> > 
> > * UEFI Secure Boot: Off
> > * Power -> Sleep State: Linux
> > * Startup -> UEFI/Legacy Boot: UEFI Only
> > * Startup -> CSM Support: Yes
> > * Config -> Thunderbolt(TM) 3 -> Thunderbolt BIOS Assist Mode: Enable
> > * Config -> Thunderbolt(TM) 3 -> Wake by Thunderbolt(TM) 3: Disable
> > 
> > It's the Thunderbolt BIOS Assist Mode: Enable that finally solved my 
> > problem. (In the BIOS itself, it recommends to set this option to Enable 
> > for Linux systems). Everything is perfect now with my system.
> > 
> > I'm running -current:
> > 
> > thor$ dmesg | grep OpenBSD   
> > OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
> > 
> > I'm happy to assist other OpenBSD users or developers if you need help 
> > further investigating this issue. I have described my adventure, along with 
> > dmesg and other details, here [4]. My dmesg is below.
> > 
> > [1] https://www.youtube.com/watch?v=lb7mDXHGDFk
> > [2] https://marc.info/?l=openbsd-bugs=154070079630478
> > [3] https://marc.info/?l=openbsd-bugs=153770491811274=2
> > [4] 
> > https://www.reddit.com/r/openbsd/comments/9q8atz/thinkpad_x1c6_heats_up_dramatically_drops/
> > 
> > OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 16912433152 (16128MB)
> > avail mem = 16390590464 (15631MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 

Re: Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-10-28 Thread Robert
WARNING:

I do not know if the orginal author is serious, or if he is trolling.

But there are known issues with the stated Thunderbolt setting in BIOS
that can brick your Thinkpad beyond repair (or BIOS reset).

See here:
https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Thinkpad-X1-Yoga-3rd-Gen-Stuck-at-Black-Screen-After-Enabling/td-p/4106952/page/3
https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/Lenovo-P52-bricked-by-selecting-BIOS-thunderbolt-support-for/td-p/4207538
https://www.reddit.com/r/thinkpad/comments/9qmqd2/thinkpad_p1_serious_issue_with_bricked_bios/
https://www.reddit.com/r/thinkpad/comments/9nb3zo/new_thinkpad_p72_biosuefi_corrupted_just_black/

(german)
https://www.notebookcheck.com/Lenovo-Einige-aktuelle-ThinkPads-koennen-scheinbar-durch-eine-UEFI-Einstellung-zerstoert-werden.346101.0.html

/Robert


On Sun, 28 Oct 2018 00:50:03 -0700
ivp...@eml.cc wrote:

> Hello,
> 
> several people reported about various problems with Lenovo Thinkpad X1 Carbon 
> 6th gen (X1C6), when performance become sluggish and fan goes wild. [1] [2] 
> [3]
> 
> I had similar problem (system OK, become sluggish with high CPU utilization 
> after sleep/wake), but was able to completely and reliably fix it by updating 
> to latest Lenovo BIOS (2018-09-17, version 1.31), and setting the following 
> settings in the BIOS:
> 
> * UEFI Secure Boot: Off
> * Power -> Sleep State: Linux
> * Startup -> UEFI/Legacy Boot: UEFI Only
> * Startup -> CSM Support: Yes
> * Config -> Thunderbolt(TM) 3 -> Thunderbolt BIOS Assist Mode: Enable
> * Config -> Thunderbolt(TM) 3 -> Wake by Thunderbolt(TM) 3: Disable
> 
> It's the Thunderbolt BIOS Assist Mode: Enable that finally solved my problem. 
> (In the BIOS itself, it recommends to set this option to Enable for Linux 
> systems). Everything is perfect now with my system.
> 
> I'm running -current:
> 
> thor$ dmesg | grep OpenBSD   
> OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
> 
> I'm happy to assist other OpenBSD users or developers if you need help 
> further investigating this issue. I have described my adventure, along with 
> dmesg and other details, here [4]. My dmesg is below.
> 
> [1] https://www.youtube.com/watch?v=lb7mDXHGDFk
> [2] https://marc.info/?l=openbsd-bugs=154070079630478
> [3] https://marc.info/?l=openbsd-bugs=153770491811274=2
> [4] 
> https://www.reddit.com/r/openbsd/comments/9q8atz/thinkpad_x1c6_heats_up_dramatically_drops/
> 
> OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16912433152 (16128MB)
> avail mem = 16390590464 (15631MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x4f057000 (63 entries)
> bios0: vendor LENOVO version "N23ET56W (1.31 )" date 09/17/2018
> bios0: LENOVO 20KHCTO1WW
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT SSDT TPM2 UEFI SSDT SSDT HPET APIC MCFG ECDT 
> SSDT SSDT BOOT BATB SSDT SSDT SSDT LPIT WSMT SSDT SSDT SSDT DBGP DBG2 MSDM 
> DMAR NHLT ASF! FPDT UEFI
> acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
> RP02(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
> PXSX(S4) RP07(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 2399 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1393.14 MHz, 06-8e-0a
> 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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,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 23MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1138.49 MHz, 06-8e-0a
> 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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 

Fixing sluggish performance on Thinkpad X1 Carbon 6th gen with proper BIOS settings

2018-10-28 Thread ivpgbe
Hello,

several people reported about various problems with Lenovo Thinkpad X1 Carbon 
6th gen (X1C6), when performance become sluggish and fan goes wild. [1] [2] [3]

I had similar problem (system OK, become sluggish with high CPU utilization 
after sleep/wake), but was able to completely and reliably fix it by updating 
to latest Lenovo BIOS (2018-09-17, version 1.31), and setting the following 
settings in the BIOS:

* UEFI Secure Boot: Off
* Power -> Sleep State: Linux
* Startup -> UEFI/Legacy Boot: UEFI Only
* Startup -> CSM Support: Yes
* Config -> Thunderbolt(TM) 3 -> Thunderbolt BIOS Assist Mode: Enable
* Config -> Thunderbolt(TM) 3 -> Wake by Thunderbolt(TM) 3: Disable

It's the Thunderbolt BIOS Assist Mode: Enable that finally solved my problem. 
(In the BIOS itself, it recommends to set this option to Enable for Linux 
systems). Everything is perfect now with my system.

I'm running -current:

thor$ dmesg | grep OpenBSD   
OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018

I'm happy to assist other OpenBSD users or developers if you need help further 
investigating this issue. I have described my adventure, along with dmesg and 
other details, here [4]. My dmesg is below.

[1] https://www.youtube.com/watch?v=lb7mDXHGDFk
[2] https://marc.info/?l=openbsd-bugs=154070079630478
[3] https://marc.info/?l=openbsd-bugs=153770491811274=2
[4] 
https://www.reddit.com/r/openbsd/comments/9q8atz/thinkpad_x1c6_heats_up_dramatically_drops/

OpenBSD 6.4-current (GENERIC.MP) #391: Thu Oct 25 15:27:35 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16912433152 (16128MB)
avail mem = 16390590464 (15631MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x4f057000 (63 entries)
bios0: vendor LENOVO version "N23ET56W (1.31 )" date 09/17/2018
bios0: LENOVO 20KHCTO1WW
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT TPM2 UEFI SSDT SSDT HPET APIC MCFG ECDT SSDT 
SSDT BOOT BATB SSDT SSDT SSDT LPIT WSMT SSDT SSDT SSDT DBGP DBG2 MSDM DMAR NHLT 
ASF! FPDT UEFI
acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
PXSX(S4) RP07(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1393.14 MHz, 06-8e-0a
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,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 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1138.49 MHz, 06-8e-0a
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,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) i7-8550U CPU @ 1.80GHz, 950.25 MHz, 06-8e-0a
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,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) i7-8550U CPU @ 1.80GHz, 897.90 MHz, 06-8e-0a
cpu3: