If you are using Intel {Nehalem} processor running Samsung motherboard, you may face overheating problem and 'catastrophic shutdown': a term which is scary and in reality, it can be. Loss of data and corrupted filesystems or (hopefully you have backed up last week) corrupted hard drive.
There maybe a easy solution such as disabling turbo boost in the Bios. (Unfortunately, Samsung RF410 doesn't have such easy solution.)
*Digression* If you are booting Windows 10, you can change the 'power options' setting to 'power saver' or 'balanced' mode. Further tweaks include going to 'change advanced power settings' > 'Processor power management':
1) set 'Maximum processor frequency' to a value such as 2000 Mhz (or any value that is lower than your maximum frequency) and,
NB: Do ensure your 'Minimum processor state' is set at 50% or higher if you are running heavy duty program.
2) under 'System cooling policy' select 'passive' for both 'On battery' and 'Plugged in'.
Great, enough for Windows, it is a small digression here to talk about it. Now we shall focus on GNU/Linux, in particular, Fedora 27.
*Lesson Proper* To turn off Turbo boost albeit a temporary solution as the Bios reset it each boot-up, we can run the following as root:
sudo -i
echo 0 > /sys/devices/system/cpu/cpufreq/boost
exit
Alternatively, we can change the Model Specific Register (msr) by:
1) installing 'msr-tools',
sudo dnf install msr-tools
2) enabling the module 'msr' editing the 'turbo' register :
sudo dnf install msr-tools
modprobe msr
3) checking the value of the register individually, a return of '1' means turbo boost disabled and '0' means turbo boost enabled using option '-p#' where #=0,.., number of core - 1:
sudo rdmsr -p0 0x1a0 -f 38:38
sudo rdmsr -p1 0x1a0 -f 38:38
sudo rdmsr -p2 0x1a0 -f 38:38
sudo rdmsr -p3 0x1a0 -f 38:38
or collectively:
sudo rdmsr -a 0x1a0 -f 38:38
or a return of '4000850081' and '850081' respectively using the following:
sudo rdmsr -x 0x1a0
NB: you may refer the man page of rdmsr online
http://manpages.ubuntu.com/manpages/trusty/man1/rdmsr.1.html
NB: you can refer to Table 2-14 representing "MSRs in Processors Based on Intel® Microarchitecture Code Name Nehalem", search under 'register address' the 'hex' value of '1A0H' Intel Nehalem Model-Specific Registers (MSRS) and search under 'Register Name' the decimal value of '38', you see 'Bit Description' having the string value of 'Turbo Mode Disable (R/W)' => hence '1' : Disabled; '0' : Enabled
https://software.intel.com/sites/default/files/managed/22/0d/335592-sdm-vol-4.pdf
4) editing the value of the register by pointing the register '0x1a0' to the value '0x4000850081' collectively:
sudo wrmsr -a 0x1a0 0x4000850081
or individually disable turbo boost on the 1st and 3rd core:
sudo wrmsr -p0 0x1a0 0x4000850081
sudo wrmsr -p2 0x1a0 0x4000850081
NB: you may refer to the man page of wrmsr online
http://manpages.ubuntu.com/manpages/xenial/man1/wrmsr.1.html
5) verify the value at register '0x1a0' which should return '4000850081':
sudo rdmsr -x 0x1a0
6) Alternatively, we can verify the 'turbo boost' mode is disabled using 'cpupower' by installing 'cpupower' and checking using option 'cpupower-frequency-info':
sudo dnf install cpupower
cpupower -c all frequency-info
7) Another useful feature of 'cpupower' is switching of power governor to 'conservative' mode using 'cpupower-frequency-set' option:
cpupower -c all frequency-set -g conservative
8) Alternatively editing sysfs /sys/devices/system/cpu directory:
echo conservative > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
9) Setting up a udev rule for permanent setting of 'conservative governor:
i) creating /etc/udev/rules.d/50-scaling-governor.rules with the content:
SUBSYSTEM=="module", ACTION=="add", KERNEL=="acpi_cpufreq", RUN+=" sudo /bin/sh -c ' echo conservative > /sys/devices/system/cpu/cpufreq/policy*/scaling_governor ' "
ii) changing /etc/udev/udev.conf from 'info' to 'debug'
udev_log="debug"
iii) creating /etc/dracut.conf.d/99-udev.conf, noting the style of the text in 'man dracut.conf'
install_optional_items+=" /etc/udev/udev.conf "
iv) update initramfs image using the following for Fedora:
sudo dracut --force
10) To verify the temperature we can use 'lm_sensors' to check the temperature by installing 'lm_sensors-sensord' and 'lm_sensors-libs' and run 'sensors':
sudo dnf install lm_sensors-sensord lm_sensors-libs
sensors
11) Alternatively, we can check the temperature of the physical processor cores using sysfs /sys/class/thermal directory:
cat /sys/class/thermal/thermal_zone*/temp
The above is hopefully enough to trouble shoot your laptop if you are running Intel Core architecture or Intel Nehalem architecture.
For Sandy bridge and above processor, you are likely to find good company in Thermald for intel_pstate management. For more info, you can refer to the ArchWiki article on "CPU frequency scaling" which has mentioned tools like 'thermald', 'cpupower' and 'i7z'.
https://wiki.archlinux.org/index.php/CPU_frequency_scaling
There maybe a easy solution such as disabling turbo boost in the Bios. (Unfortunately, Samsung RF410 doesn't have such easy solution.)
*Digression* If you are booting Windows 10, you can change the 'power options' setting to 'power saver' or 'balanced' mode. Further tweaks include going to 'change advanced power settings' > 'Processor power management':
1) set 'Maximum processor frequency' to a value such as 2000 Mhz (or any value that is lower than your maximum frequency) and,
NB: Do ensure your 'Minimum processor state' is set at 50% or higher if you are running heavy duty program.
2) under 'System cooling policy' select 'passive' for both 'On battery' and 'Plugged in'.
Great, enough for Windows, it is a small digression here to talk about it. Now we shall focus on GNU/Linux, in particular, Fedora 27.
*Lesson Proper* To turn off Turbo boost albeit a temporary solution as the Bios reset it each boot-up, we can run the following as root:
sudo -i
echo 0 > /sys/devices/system/cpu/cpufreq/boost
exit
Alternatively, we can change the Model Specific Register (msr) by:
1) installing 'msr-tools',
sudo dnf install msr-tools
2) enabling the module 'msr' editing the 'turbo' register :
sudo dnf install msr-tools
modprobe msr
3) checking the value of the register individually, a return of '1' means turbo boost disabled and '0' means turbo boost enabled using option '-p#' where #=0,.., number of core - 1:
sudo rdmsr -p0 0x1a0 -f 38:38
sudo rdmsr -p1 0x1a0 -f 38:38
sudo rdmsr -p2 0x1a0 -f 38:38
sudo rdmsr -p3 0x1a0 -f 38:38
or collectively:
sudo rdmsr -a 0x1a0 -f 38:38
or a return of '4000850081' and '850081' respectively using the following:
sudo rdmsr -x 0x1a0
NB: you may refer the man page of rdmsr online
http://manpages.ubuntu.com/manpages/trusty/man1/rdmsr.1.html
NB: you can refer to Table 2-14 representing "MSRs in Processors Based on Intel® Microarchitecture Code Name Nehalem", search under 'register address' the 'hex' value of '1A0H' Intel Nehalem Model-Specific Registers (MSRS) and search under 'Register Name' the decimal value of '38', you see 'Bit Description' having the string value of 'Turbo Mode Disable (R/W)' => hence '1' : Disabled; '0' : Enabled
https://software.intel.com/sites/default/files/managed/22/0d/335592-sdm-vol-4.pdf
4) editing the value of the register by pointing the register '0x1a0' to the value '0x4000850081' collectively:
sudo wrmsr -a 0x1a0 0x4000850081
or individually disable turbo boost on the 1st and 3rd core:
sudo wrmsr -p0 0x1a0 0x4000850081
sudo wrmsr -p2 0x1a0 0x4000850081
NB: you may refer to the man page of wrmsr online
http://manpages.ubuntu.com/manpages/xenial/man1/wrmsr.1.html
5) verify the value at register '0x1a0' which should return '4000850081':
sudo rdmsr -x 0x1a0
6) Alternatively, we can verify the 'turbo boost' mode is disabled using 'cpupower' by installing 'cpupower' and checking using option 'cpupower-frequency-info':
sudo dnf install cpupower
cpupower -c all frequency-info
7) Another useful feature of 'cpupower' is switching of power governor to 'conservative' mode using 'cpupower-frequency-set' option:
cpupower -c all frequency-set -g conservative
8) Alternatively editing sysfs /sys/devices/system/cpu directory:
echo conservative > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
9) Setting up a udev rule for permanent setting of 'conservative governor:
i) creating /etc/udev/rules.d/50-scaling-governor.rules with the content:
SUBSYSTEM=="module", ACTION=="add", KERNEL=="acpi_cpufreq", RUN+=" sudo /bin/sh -c ' echo conservative > /sys/devices/system/cpu/cpufreq/policy*/scaling_governor ' "
ii) changing /etc/udev/udev.conf from 'info' to 'debug'
udev_log="debug"
iii) creating /etc/dracut.conf.d/99-udev.conf, noting the style of the text in 'man dracut.conf'
install_optional_items+=" /etc/udev/udev.conf "
iv) update initramfs image using the following for Fedora:
sudo dracut --force
10) To verify the temperature we can use 'lm_sensors' to check the temperature by installing 'lm_sensors-sensord' and 'lm_sensors-libs' and run 'sensors':
sudo dnf install lm_sensors-sensord lm_sensors-libs
sensors
11) Alternatively, we can check the temperature of the physical processor cores using sysfs /sys/class/thermal directory:
cat /sys/class/thermal/thermal_zone*/temp
The above is hopefully enough to trouble shoot your laptop if you are running Intel Core architecture or Intel Nehalem architecture.
For Sandy bridge and above processor, you are likely to find good company in Thermald for intel_pstate management. For more info, you can refer to the ArchWiki article on "CPU frequency scaling" which has mentioned tools like 'thermald', 'cpupower' and 'i7z'.
https://wiki.archlinux.org/index.php/CPU_frequency_scaling