LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-13-2012, 01:45 AM   #1
aluchko
Member
 
Registered: Mar 2004
Location: Edmonton, AB, Canada
Distribution: Fedora
Posts: 37

Rep: Reputation: 15
unable to disable a core


I'm attempting to disable one of the two cores in my laptop, I've done it previously by setting /sys/devices/system/cpu/cpu1/online to 0, but this time the file simply rewrites to 1
Code:
[root@losgar ~]# echo 0> /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online

1
[root@losgar ~]# cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core CPU       T4300  @ 2.10GHz
stepping        : 10
microcode       : 0xa0b
cpu MHz         : 1200.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dts
bogomips        : 4189.93
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1                                                                                           
vendor_id       : GenuineIntel                                                                                
cpu family      : 6                                                                                           
model           : 23
model name      : Pentium(R) Dual-Core CPU       T4300  @ 2.10GHz
stepping        : 10
microcode       : 0xa0b
cpu MHz         : 2100.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dts
bogomips        : 4189.93
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

[root@losgar ~]# uname -a
Linux losgar 3.3.1-3.fc16.x86_64 #1 SMP Wed Apr 4 18:08:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Anyone know why this might not be working, or another way to disable the core?
 
Old 04-19-2012, 08:10 PM   #2
aluchko
Member
 
Registered: Mar 2004
Location: Edmonton, AB, Canada
Distribution: Fedora
Posts: 37

Original Poster
Rep: Reputation: 15
For further information the laptop dual boots Ubuntu and I have the same issue there. When I try editing the file with VI I get the message

Code:
"/sys/devices/system/cpu/cpu1/online" E667: Fsync failed
WARNING: Original file may be lost or damaged
 
Old 04-19-2012, 08:28 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Quote:
Originally Posted by aluchko View Post
I'm attempting to disable one of the two cores in my laptop, I've done it previously by setting /sys/devices/system/cpu/cpu1/online to 0, but this time the file simply rewrites to 1
Code:
[root@losgar ~]# echo 0> /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online

1
Note the blank line prior to the cat output ???. Try "echo 0 > ..." yes, with a space/blank character.
 
Old 04-19-2012, 09:33 PM   #4
aluchko
Member
 
Registered: Mar 2004
Location: Edmonton, AB, Canada
Distribution: Fedora
Posts: 37

Original Poster
Rep: Reputation: 15
Yup...

Code:
echo 0 > /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online
Does the trick. Note sure what bash was doing with the "0>", maybe it's related to stream redirection 2>.

thanks!
 
  


Reply

Tags
cpu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to disable cron email joseph_k Linux - Software 2 06-16-2011 12:57 PM
Unable to disable GUI effects in KDE 3.5 (Fedora Core 5) virstulte Linux - Desktop 4 08-25-2006 11:28 PM
Fedora Core 4 - disable gnome theycallmepj Linux - General 7 11-04-2005 09:36 PM
Unable to Disable TAPPING javb Linux - Newbie 1 03-11-2005 07:40 PM
Unable to disable X from loading at statup morrolan Linux - Software 6 09-09-2003 08:55 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration