Bug #178

Freezes in Linux on T520

Added by Martin Zwicknagl 5 months ago. Updated 4 months ago.

Status:NewStart date:11/06/2018
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:os_handoff
Target version:-

Description

I am getting sporadic freezes of Linux on my T520 with coreboot (coreboot-4.8-2001-g42adb29853).
Sometimes the freezes occur shortly after booting the kernel, sometimes after hours of use.
When the machine is under heavy load, the freeze DO NOT occur (I can do hours of compiling
gentoo packages, no freeze). When waiting, browsing or wordprocessing the freezes occur more often.

The freezes occur on kernel versions from 4.18.x to 4.19.0 with CONFIG_NR_CPUS=4

When I compile the kernel with CONFIG_NR_CPUS=3 the freezes disappear (but then I have only 3 CPUs).

The laptop is a T520 with an i5-2520M CPU @ 2.50GHz (SandyBride).
Memory consists of two DDR3 (8GB+2GB).
The ME is disabled and shrinked.
Coreboot is coreboot-4.8-2001-g42adb29853
Graphics is integrated only.

In the attachment you find the kernel config, coreboot config, various cbmem outputs, /sys/firmware/log and dmesg

My bug seems similar to https://ticket.coreboot.org/issues/121, but I am sure to have the correct ME, extracted from the original ROM.
I have never changed the CPU.

Could someone help me to use 2cores/4threads and coreboot.

Thanks

cbmem-1.out - cbmem -1 output (36.7 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

cbmem-T.out - cbmem -T output (1 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

cbmem-l.out - cbmem -l output (718 Bytes) Martin Zwicknagl, 11/06/2018 06:22 PM

cbmem-c.out - cbmem -c output (36.7 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

coreboot-config - config of coreboot (23.3 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

kernel-config - config of kernel (23.3 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

sys-firmware-log - /sys/firmware/log (33.6 KB) Martin Zwicknagl, 11/06/2018 06:22 PM

dmesg (50.6 KB) Martin Zwicknagl, 11/06/2018 06:27 PM

History

#1 Updated by Martin Zwicknagl 5 months ago

Hello all,

it seem, that disabling
Processor type and features
-> [ ] SMT (Hyperthreading) scheduler support
solves my problem.
I have four CPUs running and I don't have any freezes.

#2 Updated by Iru Cai 5 months ago

Yes, it's the same problem with #121.

I'm now trying to test if it has something to do with the H8 config. I extracted the H8 related devicetree items with autoport on an iGPU T520, and patch as the following:

diff --git a/src/mainboard/lenovo/t520/variants/t520/devicetree.cb b/src/mainboard/lenovo/t520/variants/t520/devicetree.cb
index 97350f3c27..1c40e32a90 100644
--- a/src/mainboard/lenovo/t520/variants/t520/devicetree.cb
+++ b/src/mainboard/lenovo/t520/variants/t520/devicetree.cb
@@ -108,24 +108,21 @@ chip northbridge/intel/sandybridge
                                                io 0x66 = 0x1604
                                        end

-                                       register "config0" = "0xa7"
-                                       register "config1" = "0x09"
+                                       register "config0" = "0xa6"
+                                       register "config1" = "0x01"
                                        register "config2" = "0xa0"
-                                       register "config3" = "0xc2"
+                                       register "config3" = "0xc4"

-                                       register "beepmask0" = "0x00"
-                                       register "beepmask1" = "0x86"
+                                       register "beepmask0" = "0xfe"
+                                       register "beepmask1" = "0x96"
                                        register "has_power_management_beeps" = "0"
                                        register "event2_enable" = "0xff"
                                        register "event3_enable" = "0xff"
                                        register "event4_enable" = "0xd0"
-                                       register "event5_enable" = "0xfc"
-                                       register "event6_enable" = "0x00"
-                                       register "event7_enable" = "0x01"
+                                       register "event5_enable" = "0x3c"
+                                       register "event7_enable" = "0x81"
                                        register "event8_enable" = "0x7b"
                                        register "event9_enable" = "0xff"
-                                       register "eventa_enable" = "0x01"
-                                       register "eventb_enable" = "0x00"
                                        register "eventc_enable" = "0xff"
                                        register "eventd_enable" = "0xff"
                                        register "evente_enable" = "0x0d"

It looks like that it can solve the problem, but still needs testing.

#3 Updated by Martin Zwicknagl 4 months ago

I have applied the above patch on:
src/mainboard/lenovo/t520/variants/t520/devicetree.cb

In the last week I had only two freezes. This is definitive better than without the patch.
Interestingly the freezes okkur only when the laptop is under almost no load or IDLE.

#4 Updated by Iru Cai 4 months ago

It doesn't completely solved the freezes for me either after I applied that patch for days.
Recently, I found that if I use the bottom of the left two USB ports, the system will likely freeze.

Interestingly the freezes okkur only when the laptop is under almost no load or IDLE.

Right, I found this when I first used T520 with coreboot years ago. But it can also freeze when the load is high.

Also available in: Atom PDF