# high system temperature



## bkouhi (Apr 7, 2013)

Hello,

I have a GIGABYTE Q2532N. And this is my FreeBSD system:


```
FreeBSD minootux 9.1-STABLE FreeBSD 9.1-STABLE #0 r249180: Sat Apr  6 08:00:47 IRDT 2013     root@minootux:/usr/obj/usr/src/sys/GENERIC  amd64
```

My laptop supports Nvidia Optimus technology and I have to use KMS to get things to work with the Intel graphics card. The problem is, the overall temperature of the system is high:


```
[CMD="#"]sysctl -a |grep temperature[/CMD]
hw.acpi.thermal.tz0.temperature: 91.0C
dev.cpu.0.temperature: 94.0C
dev.cpu.1.temperature: 94.0C
dev.cpu.2.temperature: 93.0C
dev.cpu.3.temperature: 93.0C
```

It's enough high that can burn my hand!

This is top(1) output:


```
PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
 1486 javad         8  20    0   335M   180M uwait   0   3:52  0.00% opera
 1462 javad         1  20    0   105M 20792K select  0   0:48  0.00% Xorg
 1637 javad         5  20    0   163M 36988K select  2   0:27  0.00% xmms
  924 root          1  20    0 14252K  1720K select  2   0:06  0.00% moused
 1485 javad        10  20    0 68460K  7520K usem    0   0:03  0.00% conky
 1496 javad         1  20    0 23056K  7140K select  3   0:03  0.00% tmux
 1609 root          1  20    0 16588K  3420K select  2   0:02  0.00% top
 1492 javad         1  20    0 93140K 27128K select  2   0:01  0.00% xterm
 1475 javad         1  20    0   144M 10768K select  2   0:01  0.00% tint2
 1465 javad         1  20    0   109M 11056K select  3   0:01  0.00% openbox
 1477 javad         1  22    0 96640K  8756K select  2   0:01  0.00% wbar
  945 root         10 -51  r1F 23824K  5232K cuse-s  1   0:00  0.00% webcamd
 1710 javad         1  20    0 76756K  8712K select  0   0:00  0.00% xterm
...
```

I searched a lot but had no result. Does anyone have any idea about it? I think it is something related to my Nvidia graphic card. I don't use it but it's always active. Is there a way to disable it?


----------



## cpm@ (Apr 7, 2013)

To disable your Nvidia graphic card, use sysutils/acpi_call module. Also need use acpidump(8) to obtain the DSDT and know how to call to switch on/off the Nvidia graphic card.

For a list of methods, see http://linux-hybrid-graphics.blogspot.com.es/search?q=acpi_call&max-results=20&by-date=true.


----------



## jrm@ (Apr 7, 2013)

I have an i5 processor inside a Lenovo X220 laptop.  Yesterday when I was compiling www/firefox the CPU temperature got up to 96C.

Here is a link from a similar Superuser question.  One of the posts includes a link to an Intel datasheet on some of their mobile processors.


----------



## bkouhi (Apr 7, 2013)

Thanks for both replies. I'm going to turn off Nvidia card using @cpu82's instructions. The output of `# acpidump -dt |grep VGA` is:


```
NVGA,   32, 
                        Store (GLID (), \_SB.PCI0.VGA.CLID)
                    Store (Local1, \_SB.PCI0.VGA.ALSI)
                    Store (\_SB.PCI0.VGA.ALSI, Local1)
                VGAS,   1, 
                VGAF,   16, 
            If (\_SB.PCI0.VGA.PRST ())
                Return (\_SB.PCI0.VGA.ADVD ())
            If (\_SB.PCI0.RP00.VGA.PRST ())
                Return (\_SB.PCI0.RP00.VGA.ADVD ())
            If (\_SB.PCI0.VGA.PRST ())
                \_SB.PCI0.VGA.SWHD (Arg0)
            If (\_SB.PCI0.RP00.VGA.PRST ())
                \_SB.PCI0.RP00.VGA.SWHD (Arg0)
            If (\_SB.PCI0.VGA.PRST ())
                Return (\_SB.PCI0.VGA.NATK ())
            If (\_SB.PCI0.RP00.VGA.PRST ())
                Return (\_SB.PCI0.RP00.VGA.NATK ())
            If (\_SB.PCI0.VGA.PRST ())
                \_SB.PCI0.VGA.GETD ()
                Store (\_SB.PCI0.VGA.MD2A (Local0), ODAV)
                Store (\_SB.PCI0.VGA.MD2A (Local1), ODPC)
                If (\_SB.PCI0.RP00.VGA.PRST ())
                    \_SB.PCI0.RP00.VGA.GETD ()
                    Store (\_SB.PCI0.RP00.VGA.MD2A (Local0), ODAV)
                    Store (\_SB.PCI0.RP00.VGA.MD2A (Local1), ODPC)
            And (\_SB.VGAF, 0x01, Local0)
                If (\_SB.PCI0.VGA.PRST ())
                    \_SB.PCI0.VGA.DWBL ()
                If (\_SB.PCI0.RP00.VGA.PRST ())
                    \_SB.PCI0.RP00.VGA.DWBL ()
                If (\_SB.PCI0.VGA.PRST ())
                    \_SB.PCI0.VGA.UPBL ()
                If (\_SB.PCI0.RP00.VGA.PRST ())
                    \_SB.PCI0.RP00.VGA.UPBL ()
            \_SB.PCI0.VGA.OPTS (Arg0)
        \_SB.PCI0.VGA.OWAK (Arg0)
    Scope (\_SB.PCI0.RP00.VGA)
    Scope (\_SB.PCI0.RP00.VGA)
    Scope (\_SB.PCI0.RP00.VGA)
            \_SB.PCI0.RP00.VGA.M_ON ()
            \_SB.PCI0.RP00.VGA.MOFF ()
                        Return (\_SB.PCI0.RP00.VGA._ROM (ARGS, XARG))
```

I don't know what is it, I just tried somethings like:


```
[CMD="#"]acpi_call -vp '\_SB.PCI0.VGA.OPTS.MOFF'[/CMD]
Path: \_SB.PCI0.VGA.OPTS.MOFF
Number of arguments: 0
Status: 5
Result: Unknown object type '0'
[CMD="#"]acpi_call -vp '\_SB.PCI0.VGA.OPTS'[/CMD]
Path: \_SB.PCI0.VGA.OPTS
Number of arguments: 0
Status: 0
Result: 0
[CMD="#"]acpi_call -vp '\_SB.PCI0.VGA.UPBL'[/CMD]
...
[CMD="#"]acpi_call -vp '\_SB.PCI0.RP00.VGA.SWHD'[/CMD]
...
```

I don't know what is that values, just tried them :e and still no result. Please give me another clue.


----------



## cpm@ (Apr 7, 2013)

Try:

```
\_SB.PCI0.RP00.VGA.MOFF # Working ACPI handle OFF
\_SB.PCI0.RP00.VGA.M_ON # Working ACPI handle ON
```

Also read http://imax.in.ua/acpi_call/.


----------



## bkouhi (Apr 7, 2013)

Thank you @cpu82. That's really like a magic. It didn't burn my hand anymore but:


```
[CMD="#"]sysctl -a | grep temperature[/CMD]
acpi_tz0: temperature 98.0C: decreasing clock speed from 2301 MHz to 2012 MHz
acpi_tz0: temperature 97.0C: increasing clock speed from 2012 MHz to 2300 MHz
acpi_tz0: temperature 98.0C: decreasing clock speed from 2300 MHz to 2012 MHz
acpi_tz0: temperature 96.0C: resuming previous clock speed (2301 MHz)
acpi_tz0: temperature 98.0C: decreasing clock speed from 2301 MHz to 2012 MHz
acpi_tz0: temperature 96.0C: resuming previous clock speed (2301 MHz)
acpi_tz0: temperature 98.0C: decreasing clock speed from 2301 MHz to 2012 MHz
acpi_tz0: temperature 93.0C: resuming previous clock speed (2301 MHz)
hw.acpi.thermal.tz0.temperature: 63.0C
dev.cpu.0.temperature: 63.0C
dev.cpu.1.temperature: 64.0C
dev.cpu.2.temperature: 62.0C
dev.cpu.3.temperature: 62.0C
```

Is it normal? If yes, how I can save this setting?


----------



## cpm@ (Apr 7, 2013)

Yes, your CPU's temperature values are normal 

You can create a boot script like this one:

```
#!/bin/sh

#Disable Nvidia
echo '\_SB.PCI0.RP00.VGA.MOFF' > /proc/acpi/call
```

Move nvidia_off.sh script to /usr/local/bin directory. Then create /etc/rc.local file and write down or copy-paste this:

```
#!/bin/sh

/bin/sh /usr/local/bin/nvidia_off.sh
```


----------



## yyangdid (Oct 10, 2017)

something error?

```
[CMD]echo '\_SB.PCI0.PEG.VID.GPOF' > /proc/acpi/call[/CMD]
/proc/acpi/call : No such file or directory.
```


----------



## sidetone (Oct 10, 2017)

cpm@ said:


> create /etc/rc.local


So /etc/rc.local is the same as /etc/rc? Except it is just for custom use.

Whereas this is not /etc/rc.conf.local, which is just a local /etc/rc.conf.


----------



## yyangdid (Oct 10, 2017)

sidetone said:


> So /etc/rc.local is the same as /etc/rc? Except it is just for custom use.
> 
> Whereas this is not /etc/rc.conf.local, which is just a local /etc/rc.conf.


hi，your 
	
	



```
echo '\_SB.PCI0.PEG.VID.GPOF' > /proc/acpi/call
```
is successful?
when i run it return 
	
	



```
/proc/acpi/call : No such file or directory.
```
  why?
I am a newer，can you help me?


----------



## SirDice (Oct 10, 2017)

yyangdid said:


> something error?
> 
> ```
> [CMD]echo '\_SB.PCI0.PEG.VID.GPOF' > /proc/acpi/call[/CMD]
> ...


This is for Linux, it doesn't work on FreeBSD.


----------



## yyangdid (Oct 10, 2017)

SirDice said:


> This is for Linux, it doesn't work on FreeBSD.


Thanks for the answer，Do you know how to make it work on FreeBSD?It make me crazy, I tried

```
[CMD]acpi_call -vp '\_SB.PCI0.PEG.VID.GPOF'[/CMD]
Path: \_SB.PCI0.PEG.VID.GPOF
Number of arguments: 0
ACPI Warning: \_SB.PCI0.PEG.VID.GPOF :Insufficient arguments - Caller passed 0, method requires 1 (20170303/nsarguments-369)
Status: 0
Result: 2
```


```
[CMD]acpi_call -vp '\_SB.PCI0.PEG.VID._PS3'[/CMD]
Path: \_SB.PCI0.PEG.VID._PS3
Status: 0
Result: 0
```
But when I look at it using the `pciconfig -lv` command, the nvidia card(vgapci0@pci0:1:0:0) still there.
Can you give me some help?  Thank you,Thank you very much!


----------



## SirDice (Oct 10, 2017)

Can't you disable it in the BIOS/UEFI?


----------



## yyangdid (Oct 10, 2017)

SirDice said:


> Can't you disable it in the BIOS/UEFI?


No, my laptop is thinkpad w541,intel hd4600 +  nvidia quadro k2100m。The BIOS does not disable the graphics card。


----------



## cpm@ (Oct 28, 2017)

The following method is available for the NVIDIA Optimus GPU.

https://wiki.freebsd.org/TuningPowerConsumption#NVIDIA_Optimus

For the NVIDIA Quadro series take a look here.


----------

