Results 1 to 7 of 7

Thread: how to disable CPU via command line

  1. #1
    Join Date
    Apr 2011
    Beans
    74

    how to disable CPU via command line

    disable first core

    echo 0 | sudo tee /sys/devices/system/cpu/cpu0/online

    enable first core

    echo 1 | sudo tee /sys/devices/system/cpu/cpu0/online

    disable second core

    echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online

    enable second core

    echo 1 | sudo tee /sys/devices/system/cpu/cpu1/online

    disable third core

    echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online

    enable third core

    echo 1 | sudo tee /sys/devices/system/cpu/cpu2/online

    disable fourth core

    echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online

    enable fourth core

    echo 1 | sudo tee /sys/devices/system/cpu/cpu3/online

    great way to improve battery life when using doing non intensive work

    i thought that disableing core would reduce power,however upon testing my battery life went from 2:10 to 1:40

    i apologize

    i just wanted to contrubute to the ubuntu community because they have been so helpful to me and this command took me a really long time to find

    i just wanted to make it easier for people to find so that they could use it for what ever reason.

    thank you all for addressing your concerns and correcting me on my false information about improving battery life

    once again i will state that by going from 4 cores to 1 core i noticed a significant decrease in my battery life

    the command works nevertheless
    Last edited by dan0804smith; March 22nd, 2012 at 06:49 PM. Reason: to clear up intentions

  2. #2
    Join Date
    Dec 2010
    Beans
    Hidden!

    Re: how to disable CPU via command line

    Thread moved to The Community Cafe.

    Not a support question.


    404

  3. #3
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to disable CPU via command line

    Have you actually noticed a battery life improvement?

    Intel says that a core or CPU disabled in this way actually uses more power than if you hadn't disabled it. Maybe AMD CPUs are different.

    The whole "disable a core" function was intended for testing purposes, and also for CPU hotplugging (which is done on server systems, where it's possible to physically remove a CPU while the computer is turned on).
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  4. #4
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to disable CPU via command line

    In theory it's silly to disable a CPU core to improve the battery life. By the very fact, that you add more cores to improve the battery life. Can you see the dilemma?

  5. #5
    Join Date
    Apr 2011
    Beans
    74

    Re: how to disable CPU via command line

    this is just meant to be guide or 'how to' for people who want to do this for whichever reason.

    just trying to contribute

  6. #6
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to disable CPU via command line

    Quote Originally Posted by Drenriza View Post
    In theory it's silly to disable a CPU core to improve the battery life. By the very fact, that you add more cores to improve the battery life. Can you see the dilemma?
    Adding more slower cores can improve performance-per-watt over fewer, faster cores.

    However, six cores will use more power than 2 identical cores.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  7. #7
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: how to disable CPU via command line

    Quote Originally Posted by dan0804smith View Post
    this is just meant to be guide or 'how to' for people who want to do this for whichever reason.

    just trying to contribute
    Sounds like something that would be good on the wiki.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •