Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Acer Aspire One D270 Netbook with

  • 2GB RAM
  • 320GB HDD
  • Intel Atom N2600 1.6 Ghz (2 cores)

and I have a problem of overheating because Ubuntu 12.04 detects 4 CPUs. Do you know how to fix that?

share|improve this question
    
Well.. in windows 7 didn't happen that to me, but i really want to change the OS to Ubuntu/Kubuntu, but there is the same problem in Ubuntu/Kubuntu (12.04) –  Iram Rmz Oct 17 '12 at 1:55

1 Answer 1

Ubuntu is just detecting the two logical cores per physical one the atom chip exposes because of Intel's hyper-threading technology.

The best way to disable this is through the BIOS settings, by pressingF1/F2/F10 (or the specific key for your machine should it differ) when your computer manufacturer's logo shows at boot and disabling it from there. On my netbook hyper-threading is on the 'Advanced' page of the BIOS setup. Now only two cores will be available to the OS.

If you cannot disable HT from the BIOS settings you can do so from within the OS by creating a script and having it run when the computer starts.

1. Create the script:
I got the script we'll be using here. I will add it below as well so you don't need to move between two browser tabs.

#!/bin/bash

# Be careful to not skip the space at the beginning nor the end
CPUS_TO_SKIP=" $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -d '-' -f 1 | sort | uniq | tr "\r\n" "  ") "


for CPU_PATH in /sys/devices/system/cpu/cpu[0-9]*; do
    CPU="$(echo $CPU_PATH | tr -cd "0-9")"
    echo "$CPUS_TO_SKIP" | grep " $CPU " > /dev/null
    if [ $? -ne 0 ]; then
        echo 0 > $CPU_PATH/online
    fi
done

Copy this into gedit and save it somewhere as disable_ht.sh.

2. Install the script:
Open a terminal by pressing Ctrl+Alt+T and navigate to where you saved the script from earlier using cd $location. Now run the following on the file you saved:

sudo cp disable_ht.sh /usr/local/bin
sudo chmod +x /usr/local/bin/disable_ht.sh

3. Set the script to run at boot:
Hit Alt+F2 and type gksudo gedit /etc/rc.local
Make this file look like this one:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#
# Add this line right above the 'exit':
/usr/local/bin/disable_ht.sh
exit 0

Click Save and exit, and now when you boot your computer into ubuntu hyper-threading will be disabled.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.