ปรับ Speed ของ CPU ใน Debian Sid

เหตุเกิด

หลังจากที่ Linux Kernel 2.6.24 release ออกมา ใน Debian unstable (sid) ก็ได้มีการเพิ่มเข้ามาเช่นกัน แต่ปัญหาของผมคือ แต่เดิมระบบจะตรวจสอบความเร็วของ CPU (เครื่องผมเป็น Centrino 1.5GHz) โดยปกติจะตรวจพบ MaxSpeed เป็น 1.5GHz และ MinSpeed เป็น 600MHz แต่หลังจาก Upgrade Kernel เป็น 2.6.24 ของ Debian ไม่ทราบเกิดจากสาเหตุอะไร เพราะสังเกตมาหลายวัน CPU ไม่เคยวิ่งไปถึง 1.5GHz เลย ตรวจสอบเข้าจริง ๆ ก็พบว่า ระบบตรวจพบ MinSpeed = MaxSpeed = 600MHz (อ้าว...โดนระบบ... อมความเร็ว CPU ซะแล้ว)

Package ที่มีส่วนเกี่ยวข้อง...

ในกระบวนการเกี่ยวกับ Speed ของ CPU ในเครื่องผมมี Package ที่เกี่ยวข้องคือ

  • cpufreqd
  • cpufrequtils

วิธีแก้ไข...

  1. แก้ไขด้วยตนเอง
    # cpufreq-set --cpu 0 --min 600MHz --max 1.5GHz --governor ondemand

    --cpu 0 : เลือก ID ของ CPU ที่ต้องการตั้งค่า
    --min, --max : เลือกความเร็วของ CPU (min,max)
    --governor : เลือก วิธีการทำงานของการปรับความเร็ว CPU (ondemand, performance, powersave ...)

  2. แก้ไขอัตโนมัติ... ทุกครั้งที่เปิดเครื่อง
    # cp /usr/share/doc/cpufrequtils/examples/cpufrequtils.sample /etc/default/cpufrequtils
    # vi /etc/default/cpufrequtils
    

    โดยแก้ไขเปลี่ยนแปลงข้อมูลดังนี้

    ENABLE="true"
    GOVERNOR="ondemand"
    MAX_SPEED=1.5GHz
    MIN_SPEED=600MHz

    เท่านี้ ทุกครั้งที่เราเปิดเครื่องมา ระบบก็จะตั้งค่าให้แล้ว ... สำเร็จ ...

Re: ปรับ Speed ของ CPU ใน Debian Sid

ขอบคุณครับ

Re: ปรับ Speed ของ CPU ใน Debian Sid

แล้วจะดูยังไงว่าระบบตรวจสอบของเราได้เท่าไรอ่ะครับ ???

Re: ปรับ Speed ของ CPU ใน Debian Sid

ลอง

# cat /proc/cpuinfo

หรือไม่ ถ้าเป็นผู้ใช้ GNOME ก็ติดตั้ง Applet สำหรับตรวจสอบความถี่ซีพียู เอาครับ สะดวกดี
___
Neutron: Linux Addict!

Re: ปรับ Speed ของ CPU ใน Debian Sid

น่าจะดูที่ /sys/devices/system/cpu/cpu0/cpufreq/* ด้วยนะครับ

หรือถ้าใช้ cpufrequtils ก็

$ cpufreq-info

มันรายงานละเอียดเลยครับ

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <blockquote> <img> <h3> <h4> <h5>
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.