Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 18:45:19 +0700
From:      "Anh Ky Huynh" <kyanh@viettug.org>
To:        freebsd-questions@freebsd.org
Subject:   system slow after tuning cpu speed with sysctl
Message-ID:  <20100119184519.01f3c2c3@icy.localdomain>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi all,

I used to change my CPU speed via sysctl:
	sysctl dev.cpu.0.freq=1650
I did that because that helped me to decrease the CPU temperature, and such speed was enough. This way went well and I did that after logging into the system via ssh. (I have some troubles with `powerd` so I have to use `sysctl` manually.)

Yesterday, because `sysctl` often required root permission, I wrote a small script that could help to to change cpu speed via ssh
	./my_script.sh 1650
	=> ssh toor@localhost sysctl dev.cpu.0.freq=1650
	(my password goes here)

Then I suddenly found that the system was very very slow after the above call, though I ran nothing (except for bash, top). Being afraid that something went wrong, I just moved to the maximum speed:
	ssh toor@localhost sysctl dev.cpu.0.freq=2200

but this couldn't help. (Using `dmesg`  I saw a line "Device wasn't configured")

Now I can't change my cpu speed anymore: If I switch from 2200 to 1925 (the next lower value), the system would be slowed down and I can't do anything (because it is very very slow). The only way is to reboot. And here is another strange thing: after the FreeBSD sends the last message of its reboot process, the system halts with black-blank screen; then I have to unplug the power supply (an external adapter), unplug the battery, wait for some seconds, plug the battery / power supply before turning the system on.

I am using FreeBSD 8.0 (RELEASE) on a laptop with a custom kernel 
	http://viettug.org/attachments/download/349/icy_kernel_20100119.txt

The full output of my `sysctl dev.cpu.`

/=================================================================================
  dev.cpu.0.%desc: ACPI CPU
  dev.cpu.0.%driver: cpu
  dev.cpu.0.%location: handle=\_PR_.CPU0
  dev.cpu.0.%pnpinfo: _HID=none _UID=0
  dev.cpu.0.%parent: acpi0
  dev.cpu.0.freq: 2200
  dev.cpu.0.freq_levels: 2200/15975 1925/13978 1650/11981 1375/9984 1100/5795 
     962/5070 825/4346 687/3621 550/2320 481/2030 412/1740
     343/1450 275/1160 206/870 137/580 68/290
  dev.cpu.0.cx_supported: C1/0
  dev.cpu.0.cx_lowest: C1
  dev.cpu.0.cx_usage: 100.00% last 500us
  dev.cpu.1.%desc: ACPI CPU
  dev.cpu.1.%driver: cpu
  dev.cpu.1.%location: handle=\_PR_.CPU1
  dev.cpu.1.%pnpinfo: _HID=none _UID=0
  dev.cpu.1.%parent: acpi0
  dev.cpu.1.cx_supported: C1/0
  dev.cpu.1.cx_lowest: C1
  dev.cpu.1.cx_usage: 100.00% last 500us
\=================================================================================

I doubt that there was something failed with my hardware :( Quite disappointed 'til now.

Could you give me advice?

Thank you for your helps,

Regards,


-- 
Anh Ky Huynh



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20100119184519.01f3c2c3>