我正在编写一个简单的 gnome 扩展来控制我的 CPU 温度,但我遇到了一个罕见的问题。当我在 shell 中执行传感器时,我得到了这个结果:
dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 0 RPM
CPU: +53.0°C
Other: +46.0°C
Other: +52.0°C
GPU: +16.0°C
acpitz-virtual-0
Adapter: Virtual device
temp1: +53.5°C (crit = +99.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +57.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +57.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +55.0°C (high = +86.0°C, crit = +100.0°C)
当我使用GLib.spawn_command_line_sync('sensors')执行相同的命令时,我的 CPU 温度会升高 10 度或更多度:
JS LOG: ----------->, dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 0 RPM
CPU: +67.0°C
Other: +46.0°C
Other: +52.0°C
GPU: +16.0°C
acpitz-virtual-0
Adapter: Virtual device
temp1: +67.5°C (crit = +99.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +68.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +65.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +68.0°C (high = +86.0°C, crit = +100.0°C)
怎么了?