# CPU overheating on ASUS X401A



## happyzik (Aug 6, 2015)

Hi all,

I've installed FreeBSD 10.1 on an Asus X401A laptop, and soon the CPU are overheating.
Just after I start the computer, in console mode, the CPU are around 62°C.
When I run XFCE (with no other program), the CPU rise 70°C.
If I run Firefox or Chromium (on single generic page, no flash), 10 seconds later, the temperature rise 88°C (I then stop since the laptop is burning my legs :/)... When I stop the browser, the temperature will cool down to 70°C.

I've enabled powerd(8) during install and it is running now.
Fans seems to do their job (at least they are spinning, but maybe not as fast as they should).

I get the temperature with:
`kldload coretemp
sysctl -a | grep temperature`

The load displayed by uptime is between 0 and 0.2. When running top, there is no process using more than 0.2% CPU.

On this computer, I also have a CentOS 6 which runs fine (no overheating, fans entering high speed only if I run intensive tasks).

Actually, I don't know what to do next... What can I do to investigate why my CPU are overheating ?

Thanks a lot...


----------



## User23 (Aug 6, 2015)

The i3 CPU which is probably used has a tcase max of 105°C.
Post the output of `dmesg` if you are unsure.

Look in `top` at

```
CPU:  0.0% user,  0.0% nice,  0.1% system,  0.0% interrupt, 99.9% idle
```

Maybe the system itself is using a unusual amount of CPU time.

If that is the case check with `systat -vm`

Maybe there is a interrupt storm on a device.

Another point that may interest you ... power consumption

https://wiki.freebsd.org/TuningPowerConsumption
https://www.freebsd.org/doc/handbook/acpi-overview.html


----------



## happyzik (Aug 6, 2015)

Thanks for your help.
I tried to add acpi_asus(4) module with no more success.


```
# kldstat
Id Refs Address  Size  Name
1  45 0xffffffff80200000 1755658  kernel
2  1 0xffffffff81956000 aca0  sem.ko
3  1 0xffffffff81a11000 9d37  linprocfs.ko
4  1 0xffffffff81a1b000 43bce  linux.ko
5  1 0xffffffff81a5f000 6c564  i915kms.ko
6  1 0xffffffff81acc000 47f80  drm2.ko
7  4 0xffffffff81b14000 1ff2  iicbus.ko
8  1 0xffffffff81b16000 1a46  iic.ko
9  1 0xffffffff81b18000 1e48  iicbb.ko
10  1 0xffffffff81b1a000 29b2  coretemp.ko
11  1 0xffffffff81b1d000 4c11  acpi_asus.ko
12  1 0xffffffff81b22000 33aa  acpi_asus_wmi.ko
13  1 0xffffffff81b26000 3fcc  acpi_wmi.ko
```

Here is my `top` output:


```
last pid:  1129;  load averages:  0.11,  0.24,  0.23  up 0+00:35:03  18:30:33
46 processes:  1 running, 45 sleeping
CPU:  0.6% user,  0.0% nice,  1.2% system,  0.4% interrupt, 97.9% idle
Mem: 149M Active, 157M Inact, 219M Wired, 7988K Cache, 77M Buf, 3307M Free
Swap:

  PID USERNAME  THR PRI NICE  SIZE  RES STATE  C  TIME  WCPU COMMAND
  904 root  1  20  -1  115M 30692K select  0  0:25  1.37% Xorg
  950 root  3  35  0  189M 24952K select  0  0:06  0.59% xfce4-ter
  961 root  45  20  0  510M  195M uwait  0  1:02  0.00% firefox
  922 root  1  20  0  161M 21168K select  1  0:04  0.00% xfwm4
```

Reading the pages you pointed, I set the cx_lowest values to C2 (the lowest supported), but still very high temperature.


```
hw.acpi.cpu.cx_lowest: C2
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.cx_supported: C1/1/1 C2/2/80
dev.cpu.0.cx_lowest: C2
dev.cpu.0.coretemp.tjmax: 100.0C
dev.cpu.0.temperature: 87.0C
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%location: handle=\_PR_.CPU1
dev.cpu.1.cx_supported: C1/1/1 C2/2/80
dev.cpu.1.cx_lowest: C2
dev.cpu.1.coretemp.tjmax: 100.0C
dev.cpu.1.temperature: 86.0C
```

I'm not sure to understand the `vmstat` output but here it is. It looks quite normal.


```
Interrupts
  4 ioflt  225 total
  cow  atkbd0 1
  14 zfod  acpi0 9
  ozfod  75 psm0 12
  %ozfod  1 ehci0 16
  daefr  46 ath0 17
  prcfr  1 ehci1 23
  169 totfr  56 cpu0:timer
  react  1 xhci0 264
  pdwak  hdac0 265
  62 pdpgs  ahci0 267
  intrn  37 cpu1:timer
225436 wire  8 vgapci0
149696 act
165664 inact
  7988 cache
3382140 free
  91296 buf
```

I also join the output of `dmesg`. I will try to update my kernel...

Thanks again for your help !


----------



## happyzik (Aug 6, 2015)

Well, the up-to-date kernel is still overheating... 

On CentOS6, with the same running environment (XFCE + firefox), I get this:


```
Core 0:        +56.0°C  (high = +86.0°C, crit = +100.0°C) 
Core 1:        +57.0°C  (high = +86.0°C, crit = +100.0°C)
```

This is 30°C lower. So I tried to disable ACPI with `sysctl hint.acpi.0.disabled=1` but then I get kernel panic while booting:


```
panic: running without device atpic requires a local APIC
```

My computer doesn't get cooler if I disable acpi_throttle.

Thanks again for your help, I really have no idea...


----------



## happyzik (Aug 10, 2015)

Some news after a few more days without success.
When I startup my computer, without X, CPUs' temperature is around 62°C, so about 10°C more than Linux with X running.

Since the CPU really get more hot when running X, and even more when running graphical apps, I thought about graphic driver. I have an Intel chipset so I tried to load i915 module, but my troubles still remain.

The temperature isn't stable. It gets higher with uptime. For instance, as I said, when I turned on my computer without X, it was around 62°C.  Then I started X, and run only Firefox to browse FreeBSD forums, the temperature got slowly more and more hot, and 30 minutes later my CPUs were 94°C... so I turned it off.

Using powerd(8), I tried to limit my CPU to 1.5Ghz (it can be up to 1.8), but the temperature always get more and more hot. No difference. Even if I do nothing, I can see the cpu freq going down to 100MHz, but still overheating... The fans are spinning though. Despite powerd(8) tells the CPU is running at a low freq, I think that in fact my CPUs are running at 100% of their capabilities...

I've updated to 10.2-RC2, no change.

Any clue is welcomed, Thanks !


----------



## tingo (Aug 11, 2015)

And running without powerd(8) doesn't help?


----------



## happyzik (Aug 11, 2015)

No 
This is exactly the same, running powerd(8) or not change nothing.
However, when I run it from command line with -v flag, I can see on the output the CPU freq getting lower if I'm idle. But in fact, the CPU doesn't get cooler nor the fan change its spinning speed.


----------



## fnoyanisi (Aug 31, 2015)

Hey, sounds like what I had. Have you tried adding drm.i915.enable_rc6=7 into /boot/loader.conf ?

Refer this thread for details.


----------



## mav@ (Sep 7, 2015)

If this problem appeared for you at all, I would say you should start from checking and cleaning your cooling system. Properly designed and functioning system should not fatally overheat under any load!

On the other side, power saving through load reduction is useful too, but for that you should not search for magic in powerd, but look what actually consumes your CPU time. While I am typing this, my Asys UX31A stays at 45C with just passive cooling, without fan ever running. But if I am starting to build something or watch HD video, case is getting hot and it starts quite noisy fan but CPU still stays at reasonable temperature.

If your cooling system is broken, then maximum frequency reduction indeed may help a bit. I had to use that tactics on one of my old servers. But that is a last resort workaround, not a proper solution. C-states and powerd can help system to consume less power in idle periods, but if your cooling system is unable to handle periods of full load -- they will only mask and postpone problem, but not solve it.


----------



## abishai (Sep 7, 2015)

Is powerd(8) actually working and lowers the frequency? Try to start it with debug flag to see output on console.


----------

